Home > Archive > PHP DB > October 2007 > Re: [PHP-DB] Prevention for multiple submissions from the same form
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-DB] Prevention for multiple submissions from the same form
|
|
| Lasitha Alawatta 2007-10-04, 6:59 pm |
| Hi TK,=0D=0A=0D=0ATry this,=0D=0A=0D=0A<input type=3D"Submit" name=3D"butSu=
bmit" value=3D"Submit" < =3Fphp=0D=0Aif($_POST['butSubmit']=3D=3D
'Submit') {=
=3F> disabled=3D"disabled" <=3Fphp }=3F> >=0D=0A=0D=0A=0D=0A=0D=0ARegards,=0D=
=0ALasitha=20=0D=0A=0D=0A=0D=0A=0D=0A-----Original Message-----=0D=0AFrom: =
T K [mailto:tek.katu@gmail.com]=20=0D=0ASent: Thursday, October 04, 2007 3:=
09 PM=0D=0ATo: php-db@lists.php.net=0D=0ASubject: [PHP-DB] Prevention for m=
ultiple submissions from the same form=0D=0A=0D=0AHi,=0D=0A=0D=0AI have a f=
orm with a button, which adds user inputted data into=0D=0Adatabase. I've b=
een looking for a way to prevent users from pressing=0D=0Athe same button t=
wice mistakingly.=0D=0A=0D=0AI've learned that this is possible to make and=
send a unique id in=0D=0Ahidden input, and check if the id is used before =
database query is=0D=0Aissued. (PHP Cookbook [O'reilly]).=0D=0A=0D=0ABut, i=
s there a way to make this happen without using database=3F It=0D=0Awould c=
ool if I could only use HTML/JavaScript/CSS.=0D=0A=0D=0ATek.=0D=0A=0D=0A-- =0D=
=0APHP Database Mailing List (http://www.php.net/)=0D=0ATo unsubscribe, vis=
it: http://www.php.net/unsub.php=0D=0A=0D=0A=0D=0ADOTW DISCLAIMER:=0D=0A=0D=
=0AThis e-mail and any attachments are strictly confidential and intended f=
or the addressee only. If you are not the named addressee you must not disc=
lose, copy or take=0D=0Aany action in reliance of this transmission and you=
should notify us as soon as possible. If you have received it in error, pl=
ease contact the message sender immediately.=0D=0AThis e-mail and any attac=
hments are believed to be free from viruses but it is your responsibility t=
o carry out all necessary virus checks and DOTW accepts no liability=0D=0Ai=
n connection therewith.=20=0D=0A=0D=0AThis e-mail and all other electronic =
(including voice) communications from the sender's company are for informat=
ional purposes only. No such communication is intended=0D=0Aby the sender =
to constitute either an electronic record or an electronic signature or to =
constitute any agreement by the sender to conduct a transaction by electron=
ic means.=0D=0A
| |
|
| Thank you for answering my question. Can anybody explain a simple
JavaScript only solution? I haven't used JavaScript except for some
copy-and-paste jobs.
Tek
| |
| Bastien Koert 2007-10-04, 6:59 pm |
|
try
<input type='submit' name='submit' value='Submit' onclick='this.style.disabled=true;' />
bastien
> Date: Fri, 5 Oct 2007 00:14:44 +0900> From: tek.katu@gmail.com> To: php-db@lists.php.net> Subject: Re: [PHP-DB] Prevention for multiple submissions from the same form> > Thank you for answering my question. Can anybody explain a simple> JavaScript only solution? I haven't used JavaScript except for some> copy-and-paste jobs.> > Tek> > -- > PHP Database Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php>
________________________________________
_________________________
Get Messenger Emoticons! Click here to learn more.
http://www.freemessengeremoticons.ca/
|
|
|
|
|