Click to See Complete Forum and Search --> : How to stop users voting on my poll more than once


Danaldinho
07-04-2008, 01:52 PM
I recently created a AJAX Poll on my website: http://www.lilwaynehq.com and you can see it in the menu on the left. Now I was wondering how can I stop users voting more than once on it?

Is there some sort of script out or even a tutorial for me to follow or if you know a way, please let me know

Thanks alot

skywalker2208
07-04-2008, 01:59 PM
I recently created a AJAX Poll on my website: http://www.lilwaynehq.com and you can see it in the menu on the left. Now I was wondering how can I stop users voting more than once on it?

Is there some sort of script out or even a tutorial for me to follow or if you know a way, please let me know

Thanks alot
When they vote you can set a cookie and on page loads check to see if that cookie is set. Problem with that is if a user clears their cookies then they can vote again. You can also store their ip address and do a check to see if that ip address has voted then just display the results.

Danaldinho
07-04-2008, 02:45 PM
Well I dont mind if that a user clears their cookies, that they are allowed to vote again

Do you have a tutorial on this aswell?

skywalker2208
07-04-2008, 03:31 PM
The link below shows how to use cookies.
http://www.w3schools.com/php/php_cookies.asp

Pretty much you check on page loads to see if the cookie is set if it isn't then display voting form. If cookie is set then just display the results. When they vote you need to set the cookie.

Danaldinho
07-04-2008, 03:46 PM
Ok, thanks mate :)

I'll check the link out now