Jump to content

Preventing People From Voting Multiple Times


AKalair

Recommended Posts

Hello,

I am creating a site where people can vote for a podcast if they like it. The number of votes received is stored in a table as are all the members details. Once a member has voted how can I prevent them from voting again. I could use cookies but it will get messy if they vote for lots of podcasts and could easily be got around.

 

Any Ideas?

 

Thanks

Create a table in the database that is nothing more than:

 

PollId | userId

 

Then when they vote on a poll, add their user id to this table associated with the poll they are voting on.  Then before they are allowed to vote, check this table to see if they already voted there.  You can take it one step further and only show the results of the poll if they already voted on it.

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.