Jump to content

Only allow 3 votes a week


xionhack

Recommended Posts

Ok, make a table with something like this.

 

Username (VARCHAR) | Votes (INT).

 

and when they vote run a insert setting a username and vote to 1 then on there next vote use a update to change that 1 to 2 with a where username = session ect.

 

James.

The simplest system is to record (in a database table) each vote, with the member id, datetime of the vote, and what they voted for. Then it is a simple matter to query for the count of votes in the time period you are interested in and if that count is less than the limit, allow a new vote.

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.