Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need a daily limit on a competition

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can anyone help me, I need to include some sort of code in a competition that I'm going to run on a website so that people can only submit their answer once a day and if they try to do it more than once, their submission will be ingored. Can anyone help me?

Thanks,

Matt
 
Hi,

You're gonna need a DB to do that. Store the IP-address and the date on which the user fills in an answer.

Check if the IP-address already exists.
If so, check if the last registered date is at least one day older than the current. If so, update the clients record. If not, show a message that the user has already posted an answer.

If it doesn't matter that much you can always use cookies that expire in a day, but than the client has to enable cookies.
And ofcourse, it's very easy to cheat with cookies.

Not that it ain't easy to cheat with an IP but that's out of your hands.

Hope this helps :p

Gtz,

Kristof

PS: Capturing a client's network card number would be even better, since you can't change that. But I don't know how to accomplish that. (If it is even possible).
 
How are you tracking the entries? An on-line database, email or what?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top