Re: Dealing with multiple form submissions

From: Date: Thu, 25 Aug 2011 13:00:38 +0000
Subject: Re: Dealing with multiple form submissions
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-314605@lists.php.net to get a copy of this message
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? that way you could check if the mail is exactly the same. probaply you could let the md5 stay in the db for hours so that nobody could use 2 browser windows to send mail1, mail2, mail1, .... it wouldn't even be necessary to store the identity of the sender since its highly inprobable that 2 100% identical messages contain anything worth bothering about. http://php.net/manual/en/function.md5.php

« previous php.general (#314605) next »