Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Poll using MySql to prevent multi votes

Status
Not open for further replies.

canajun

Programmer
Sep 28, 2002
57
CA
While I have found many scripts for polls which use cookies/ip for limiting to one vote, I need one that uses MySql to prevent multi-votes..

Our website is secured by .htaccess and a member database.. a cookie is created upon entry to restricted area.

What I want to do is enable polling, that checks the cookie, and refers to the mysql db to see if the member has voted, if not, proceed to voting booth. If they have, see results of poll so far..

Is anybody familiar with a script that may do this?

Thanks
 
Hey!

I figured it out.. please disregard..
 
In my particular application, when a user signs in, a cookie is set which includes their username.. I simply changed the poll script to log REMOTE_USER rather than ip address..

Works ok for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top