Re: Dealing with multiple form submissions
| From: | John Black | Date: | Wed, 24 Aug 2011 15:52:12 +0000 |
| Subject: | Re: Dealing with multiple form submissions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314595@lists.php.net to get a copy of this message | ||
On 08/24/2011 03:04 AM, Jason Pruim wrote:
Wondering what everyone does to prevent multiple form submissions? My form is simply getting emailed to my email, and it redirects to a success page when submitted... Would it be as simple as doing something with the cache control? Basically I'm trying to avoid someone submitting a form... Then hitting back, and submitting again, then hitting back.... I think you get the idea... What do you all do? Jason PruimHi, I am using $_SESSION for this. Set a value on the initial page, a timestamp is a good choice, then validate the value on the receiving script and clear the value. I like to use a timestamp because it will allow you to deny a comment which took too long to submit.