I generate random key and put it on the hidden input. When I get submit from
client, I compare, is this key actual or old.


if ($user_key == $key){
 echo "Normal submit<br>";
 echo "Refresh";

$key = md5(mt_rand(0,9999999));

$html  = "<FORM action=\"test.php\" method=\"post\">\n".
   "<INPUT type=\"text\" name=\"text\" /><br>\n".
   "<INPUT type=\"submit\" />\n".
   "<INPUT type=\"hidden\" name=\"user_key\" value=\"$key\" />\n".
echo $html;

Raivo Tali

"Ryan Adorable" <[EMAIL PROTECTED]> wrote in message
> Hi,
>    I created a poll program for my homepage. When i vote some field in my
database gets incremented, but after successfully voting when i clicked on
reload/refresh of my browser the said field is also incremented. How can I
fix/avoid this problem?
>    Hoping for a reply.
>    Thanks
> Ryan
> _____________________________________________________________
> Sign up for FREE email from FloppyDisk at http://www.floppydiskonline.com

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to