Re: php-windows Subject: How do I prevent double posts?

From: Date: Sat, 12 Jul 2003 17:51:34 +0000
Subject: Re: php-windows Subject: How do I prevent double posts?
Groups: php.windows 
Request: Send a blank email to php-windows+get-20781@lists.php.net to get a copy of this message
The unique ID I normally use is to log the session ID into the DB and check if there are records with that ID before accepting the submission. 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: <000501c3485a$3ff31e60$8000a8c0@q> From: "Stephen" <stephen.edmonds5@btinternet.com> To: "Windows Helplist \(PHP\)" <php-windows@lists.php.net> 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" <neil@fresh-toast.uklinux.net> To: <php-windows@lists.php.net> 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" <matt@criticalcode.com> To: <php-windows@lists.php.net> Date: Thu, 10 Jul 2003 22:01:34 -0700 Message-ID: <001301c34769$81196850$0300a8c0@webdevx> 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


« previous php.windows (#20781) next »