Limiting form entry to once a day

I need to limit form data entry to once a day.

I have created a login and a PHP script that writes variables to a txt file. However, I want to limit the users ability to enter data to the server date, so that they can only enter in data once per day.

For example, a poll that allows a user base to vote once per day.

I need to do it using Actionscript, PHP, CGI, or javascript.

Any ideas, tutorials, or examples out there?

Easiest way is to set a cookie on submission which expires the day after. setCookie method of PHP, check the manual, if you need help, let me know.

Would the cookie be server or client side?

I’m trying to prevent people from cheating and entering in data repeatedly. For example, they could just delete the cookie or change the local time and date on their computer to get around a local cookie or local variable (i.e. getDate).

If the cookie could be server side then I think it could work. The cookie could have the user name and if entered the date entered was true and expire in a day.

However, wouldn’t it also have to contain some check to ensure the present date is one day after the past date (or the user could change their local date and defeat it again).

If you could help with the PHP for that, that would be great.