Re: Dealing with multiple form submissions

From: Date: Thu, 25 Aug 2011 13:30:07 +0000
Subject: Re: Dealing with multiple form submissions
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-314606@lists.php.net to get a copy of this message
On 25.08.2011 15:00, Andreas wrote:
Am 25.08.2011 11:01, schrieb John Black:
True, a SESSION can be reset by closing the browser but I am not trying to deny a user from submitting different information again. I want to prevent them from submitting the same data again by accident (back button or refresh).
what about storing an md5 of the message body in the db?
Sure you can do all kinds of things with a database but I try to avoid unnecessary connection to the db because they are expensive. It all comes down to how badly you want to prevent the same message to be sent twice. I have seen bots submit the same message from multiple IPs and some will even modify the message a bit by adding some random data to the end. So I am not sure how effective a simple md5 check will be. -- John

« previous php.general (#314606) next »