...

View Full Version : Form on a timer that cant be submitted more than once within the hour .. HOW? help



maxvee8
03-03-2008, 03:20 AM
hey im creating an app that maybe open to abuse on a comment form, im wanting to restrict the number of times the form is submited within an hour to say 3 times by a user.


any one know any thing about this sorta thing, any eamples , places to start, tutorials, code ... i just dont know where to start with a form like that

regards max

mlseim
03-03-2008, 04:17 AM
Use Google to search for: PHP cookie tutorial

Use cookies. Set a cookie (time value). Redirect back
and check the cookie to see if it's there (if it exists).
If not, it means they have cookies disabled, so you will
not accept the comment. If you see the cookie,
then check the value and see if the time has elapsed.
Check it each time they refresh or revisit the page.
When it has elapsed, reset cookie value with a new time.

Note, you can also set and check the same cookie(s) using
Javascripting along with PHP, so you could dynamically display
a running timer that shows the user how much longer they
need to wait until the next allowable comment.

maxvee8
03-03-2008, 12:45 PM
ok cool thanks aill have a look in to it good starting point , cause i had no idea what i was looking for ,lol



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum