RE: Re[2]: [PHP-WIN] Preventing multiple submits

From: Date: Thu, 24 Aug 2000 17:56:22 +0000
Subject: RE: Re[2]: [PHP-WIN] Preventing multiple submits
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-2113@lists.php.net to get a copy of this message
Zak, Are you saying by default that as soon as PHP receives a form it doesn't accept any more forms from the same client? This doesn't seem to be the case on the PHP script I've written. I've developed a "Tell A Friend" form where the user enters a friends name and email address and then clicks on submit. The form is posted to a PHP script that performs data validation and then generates an email. However, if the user clicks on the submit button several times then 2 emails are sent, etc. Thanks James -----Original Message----- From: Zak Greant [mailto:zak@php.net] Sent: 24 August 2000 18:14 To: Pablo Vera Cc: James Duncan; php-windows@lists.php.net Subject: Re[2]: [PHP-WIN] Preventing multiple submits At 12:03 PM 8/24/00 -0500, Pablo Vera wrote: >[snip] >James, Zak: > >I'm not so sure this is a good idea, I think that the problem should >be resolved, where the problem is originated, and eventhough I prefer >PHP, I think that in this case it should be solved by the Client-Side, >i.e. JavaScript. JavaScript is not a reliable choice for this matter. It is not available on some clients. On the clients that support it, it can be disabled. >What I don't like of the Server-Side solution is >that the form WILL BE submitted a second time, and that (I'm not so sure) >the first submission will somehow be interrupted by the second one. As soon as the PHP script receives one form, then it will not accept any further forms from the same client. So, either a form is received and no more will be accepted from the same client in the same session or a form has not been received... - zak

« previous php.windows (#2113) next »