I meant to say, this is what I would do client side to prevent them submitting the form twice initially - its more effective than a round trip to the server telling them what they already know (that they have a twitchy trigger finger :-)
Cheers - Neil.
At 09:44 12/07/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
From: "Stephen" <[EMAIL PROTECTED]>
To: "Windows Helplist \(PHP\)" <[EMAIL PROTECTED]>
Date: Sat, 12 Jul 2003 10:44:55 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-WIN] Re: php-windows Digest 11 Jul 2003 19:46:14 -0000 Issue 1820
This is a weak solution to the problem, as users without javascript enabled (And possibly other browsers) will be able to send the form twice still. Perhaps a better way would be to give a form a unique ID which PHP can then check aganist a database of some sort. That would completely stop double sending, and providing IDs which are "old" are deleted you should not have any problem. As for making the unique ID, using the microtime() function to get the time with miliseconds should work quite well.
Stephen
----- Original Message ----- From: "Neil Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 12, 2003 1:11 AM Subject: [PHP-WIN] Re: php-windows Digest 11 Jul 2003 19:46:14 -0000 Issue 1820
> Usually I run some javascript to set the 'disabled' attribute for the > submit button, then check the attribute is set when the user trys to press > the submit button again. This works in IE cause the button is actually > disabled. It is not disabled in netscape, however the value dsaibleds is > set. Therefore, checking if submit.disabled=true allows you to trap this. > > Return 'false' to your form submit code and the form will not submit again. > > HTH > Cheers - Neil. > > At 19:46 11/07/2003 +0000, you wrote: > >From: "Matt Babineau" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Date: Thu, 10 Jul 2003 22:01:34 -0700 > >Message-ID: <[EMAIL PROTECTED]> > >MIME-Version: 1.0 > >Content-Type: multipart/alternative; > > boundary="----=_NextPart_000_0014_01C3472E.D4BA9050" > >Subject: How do I prevent double posts? > Using CURL + Authorize.NET > > > >I have a CURL+Authorize.net solution in place, how can I prevent double > >posts to authorize.net when I post the payment info to the page? What are > >some good solutions you have in place? > > > >Thanks, > > > >Matt Babineau > >www.criticalcode.com > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php