Click to See Complete Forum and Search --> : wait time.
Pixel-Artist
11-19-2005, 09:32 PM
How do you make it so you have to wait so many seconds before you could submit a form again.
Like the search funtion on vBulletin. I guess this forum has it disabled.
or would I have to do this with javascript?
SpectreReturns
11-19-2005, 09:49 PM
Depends on how you want to do it. If you want it to come up saying "wait for 60 seconds" you would save the last timestamp in the database and then check the current time against that. If you wanted it to be disabled until the time, you'd use Javascript.
Pixel-Artist
11-19-2005, 09:55 PM
Hmmm I'm not sure which one I need.
I basicly have this ajax shoutbox that uses mysql to store the databse - http://www.adam.argyllhosting.com/test/test/test/shoutbox.php
Want it so someone has to wait lets say 30 seconds before they are able to post another shout
Thanks for your help in advance.
purefan
11-19-2005, 11:53 PM
how about a 'PHP in HTML' page?
a php page that constructs an html page depending on the (say) $_POST parameter and use Javascript for counting 30 seconds and then enabling the submit form.
something like
onsubmit="return IsItTimeYet();"
Pixel-Artist
11-20-2005, 12:09 AM
how would I do that?