Click to See Complete Forum and Search --> : permanetly disable submit button
nett1121
01-22-2004, 05:13 PM
Hi
Is there a way to disable the submit button on a form permanently after a user has submitted it once? Or at least for 30 days? If they try to click on it again they would be redirected to another page saying they have used this form once before?
Thanks!!
buntine
01-25-2004, 01:37 AM
Yes, though it is done using javaScript rather than CGI.
Write a script that does the following:
Store a cookie on the users computer once they have submitted the form. Next time the user visits the page, the cookie will be located and the form submit button will be disabled.
You can instruct the cookie to expire in 30 days if you like.
Regards,
Andrew Buntine
nett1121
01-25-2004, 04:35 AM
Thanks for answering me. I know there are javascripts that will disable the submit button but because they all reset if the user clears their cookies someone told me I needed a server side script instead. I was trying to find out if there really is a way to do this.
I appreciate your help!!
buntine
01-25-2004, 05:21 AM
You could store the users IP address in a database or ASCII text file. But that is not very reliable because most users do not have static IP's.
To my knowledge, storing cookies is the only other way to permanently store data about a user.
Regards,
Andrew Buntine.