Hi,
shapper wrote:
Hello,
I am creating a Poll system and I need to check if a user has already
voted.
What should be the best way to do this?
1. Should I save the user IP along with its vote in the database?
But does not some users IP change each time they access the
internet?
It can, yes. IP is not reliable as identification of a person.
>
2. Should I place a cookie in after the user voted?
It will only identify the browser that the user is using. If the user
changes PC, clears the cookie, or if another user uses the PC, you'll
have problems. So cookies are not reliable for identification of a person.
Well, any help will be great.
Unless you implement a login system, with a secure password, and only
allow logged-in users to vote, you won't be able to do this reliably, I
fear. The Internet is pretty free. That's what allows you to post under
a nickname ;-)
One possible method is to ask the user politely to vote only once. That
will be at least as reliable as using cookies or IP...
Thanks,
Miguel
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch