Re: Tutorial?
| From: | Aron Pilhofer | Date: | Sun, 03 Mar 2002 17:31:45 +0000 |
| Subject: | Re: Tutorial? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17430@lists.php.net to get a copy of this message | ||
Could you not put the form inside an if/else statement? If the button isset,
or if the name equals submit, then show it disabled. Can't think of a lot of
uses for this, unless, I suppose, you want to have a page with lots of forms
on it, and you want to submit pieces of information. It wouldn't prevent
users from reloading the page and creating duplicate records.
"Greg Donald" <greg@destiney.com> wrote in message
news:Pine.LNX.4.33.0203030948150.21590-100000@destiney.com...
> On Sat, 2 Mar 2002, Jennifer Downey wrote:
>
> >Can anyone point me to a good tutorial on how to disable a submit button
> >once clicked?
> >preferably in php.
>
> If you reload the page after the button is clicked then you can simply
> pass a $disable variable in your form as a hidden field, then you can
> check for the variable before drawing the button the second time.
>
> Sounds more like a javascript thing to me though. PHP is a server side
> scripting language, it's not designed to manipulate forms and buttons,
> where javascript is.
>
> --
> -----------------------------------------------------------------------
> Greg Donald - http://destiney.com/
> http://phprated.com/ |
> http://phplinks.org/ |
> http://phptopsites.com/
> -----------------------------------------------------------------------
>
>