Jump to content

Voting system - identifying voter and integrity of the vote


kiwiora

Recommended Posts

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)

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 ^^

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.