Forum Moderators: coopster
I have a site built around a database.
There are articles in this database which I want the users to be able to rate, the trouble is I only want them to be able to rate each guide once.
Everyone must login to vote, but what is the best way to do it with several hundred articles to rate on?
Making sure they login before voting and the rating code itself works fine, I just need help on how to stop the same person voting twice.
Any ideas?
Thank you
And each time the user votes do something like
$result=mysql_query("select artID from votes where userID=$userid and artID=$articleid");
if(mysql_num_rows($result)) echo "Cheater!";
else { mysql_query("insert into votes values($articleid,$userid,$vote)"); echo "Done!"; }
just 3 lines ;)
Amazing what a fresh set of eyes can do :)
Thank you again
Thanks a lot, you have saved a lot of hassle!