Jump to content

Voting system - identifying voter and integrity of the vote


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.