Re: voting script

From: Date: Wed, 02 Aug 2000 18:10:37 +0000
Subject: Re: voting script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9767@lists.php.net to get a copy of this message
At 05:34 PM 8/2/00 +0100, you wrote:
Hi, What I want to do is have a system that stops people from voting on each section more than once (i.e. cheating). <snip> this seems like the most feasible idea *I* have come up with so far, I was wondering whether anyone has had better solutions for a similar situation though? Thanks in advance for any help,
       Robert Morrissey
What I have done in the past was to request their email address along with the 'vote'. The database would have three additional fields (vote confirmation number, vote confirmation number2, vote verified). When a vote was requested/submitted, the script would generate two random numbers and put them in the vote conf. fields and set vote_verified to 'false'. It would then send a short email to the email address submitted with a url for them to verify their vote. The url could be something like this: http://www.yoursite.com/voting/vote-confirm.php?V1={first random number}&V2={second random number}&Email={email address} The vote-confirm script would check the database for the email address and make sure the two confirmation numbers are correct. If not, it would print an error page. If so, then it would change the vote_verified to 'true'. For a simple example (and code) of this, check out: http://sourceforge.net/project/?group_id=2641 or to see it in action - http://www.glcomputers.com/Wandrer/ffa/ Paul

« previous php.general (#9767) next »