Here is my senerio.
I run a contest that has an html entryform that needs to be filled out to enter. I only want a person to be able to send this entryform 1 time per day!
The html form is validated on the client side with javascript to make sure all required fields are filled in. then action="my.php file".
my php file connects to mysql database where the information is stored with an ID number and Timestamp (w/ date).
ID, FNAME, LNAME, EMAIL, ETC.. is entered into my database
First Question: could you point me in the direction for a good server side validation tutorial.
Second Question:
I want them to be able to submit the entry form 1 time per day...how do i control this? I thought about doing cookies but if multiple ppl share computers this would cause a problem.
My thought: is to control it by their email address, maybe?
have it check my database for their last submission by their email address and look at the timestamp of that submission - if the difference btw the current time/date and the last submission is less than 24 hrs or (idealy the date is the same, i want per day not per 24 hrs) then it could stop the submission and give an error message?
is this possible? is this a good idea? is there a better way?
my experience is html, css...i've just got into javascript, php, cgi, perl, etc... so i don't know what is possible and what isn't.
if you know of any tutorials or something that would be great
also, i know all of this could just be ruined if they create fake email address...this would allow them to enter many many times....im working on creating a members only area to only allow members with real email addresses to enter...
any help would be appreciated.
if i should post this under a different topic please let me know. or if i should post any code or a better explanation.
thanks,
paul