Re: avoid multiple submissions
| From: | Jason Wong | Date: | Thu, 02 May 2002 18:29:56 +0000 |
| Subject: | Re: avoid multiple submissions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95726@lists.php.net to get a copy of this message | ||
On Friday 03 May 2002 02:23, Rodrigo Peres wrote:
> Hi list,
>
> There's any way to avoid a "speed gonzales" user to keep pressing submit
> button while you PHP is processing the code???
> I was looking in my mysql and found some duplicate entries with a
> diference with seconds in the time.
Include a random string in a hidden element in your form, insert this random
string into some table in your database. When someone submits the form check
whether the random string occurs in the table, if so it is a valid
submission, do the updates and remove the random string from table.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Accent on helpful side of your nature. Drain the moat.
*/