kiwiora Posted October 29, 2007 Share Posted October 29, 2007 Hi, This is my very first attempt at using PHP I am trying to setup a voting system for our intranet (staff awards - free text fields). I have the database adding the votes no problem. What I would like to do however is the following: 1. It's our intranet, there is no need for each person to login so it just uses "user/user". However I need to capture the person's login on the vote record so I can identify who voted. 2. restrict the users to one vote each. I have done some research and it looks like I have to create a cookie. example found: http://dscripts.awardspace.com/scripts.php?id=50 OR query using the above?? Any help and guidance would be much appreciated. TIA I am using PHP, Filemaker 9 and Dreamweaver MX (FM Studio plugin) Quote Link to comment https://forums.phpfreaks.com/topic/75166-voting-system-identifying-voter-and-integrity-of-the-vote/ Share on other sites More sharing options...
Azu Posted October 30, 2007 Share Posted October 30, 2007 Whatever you do don't base it on cookies/javascript/clientside stuff unless you don't care if every idiot and their grandma and bypass it. Just change the insert statement to an insert ignore. Then go into your database and create a new index for the vote table.. including the ID of what is being voted on, and the name of the person voting. Set it to unique. This should be more or less bullet proof in your situation and very fast/easy to implement. Enjoy ^^ Quote Link to comment https://forums.phpfreaks.com/topic/75166-voting-system-identifying-voter-and-integrity-of-the-vote/#findComment-381522 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.