Forums

PHP

This topic is locked

prevent user from polling more than once..

Posted 13 Feb 2003 10:12:10
1
has voted
13 Feb 2003 10:12:10 Terry Lau posted:
Hello,
I'm making a poll. I want to prevent user from polling more than once, how to write the PHP code? Any existing example providing for me?
Thanks!!

Replies

Replied 14 Feb 2003 09:59:02
14 Feb 2003 09:59:02 Nicholas Bennett replied:
HI Mufcterry,

I have done something similar on one f my clients sites, the way i did it was to set a permenant cookie once they had voted, then if they try to vote again i checked to see if a cookie existed and if it did a new vote will not be added only the results of the poll so far.

Read up on setting and reading cookies here ( www.php.net/manual/en/function.setcookie.php )

Good luck!

Reply to this topic