Basically, I have a monthly contest on a website. Users are directed to register once, and supply the important contact info we need to notify them if they win. However, they are allowed to enter one time per day, every day of the month.
On the same page is another form where they can simply put their email. This if for those who have already filled out the first ticket, and we have their data in a database. Then, they can just enter their email, and it would count as an entry for that day as well.
So, in my database, I have a table row that is set to "datetime". I'm thinking the best way to do this would be each time they enter, to have a table row that would count the entries daily, and enter the date and time entered. This needs to validate through the "datetime" row, and I need a script that would check the date, which may need to be a "timestamp" instead of "datetime". This script would use the mysql timediff() function to see whethere the time between the last timestamp and the current time () is more than 24 hours. If so, validate, and log the time and entry into the database.
I don't know much about the timediff() function, and I'm looking for help to set this up.
Any help would be greatly appreaciated.