RE: [PHP] Avoiding repost
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Thu, 26 Jul 2001 08:22:53 +0000 |
| Subject: | RE: [PHP] Avoiding repost | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59701@lists.php.net to get a copy of this message | ||
Set a flag
either cookie, or db based.
in your submit code, set the flag, fairly simple
if ($submitted) {
//error i've been posted already
}
else {
//do form submit stuff.
$submitted=1;
//SetCookie or session variable...
}
-----Original Message-----
From: Ashley M. Kirchner [mailto:ashley@pcraft.com]
Sent: July 26, 2001 4:02 PM
To: PHP-General List
Subject: [PHP] Avoiding repost
I have a card system that will ask for the required information, and
one hits a 'Send' button to send the card. This will submit all the
information to a database and send the viewer to a 'Thank You' page.
The problem is, if they hit reload on that (Thank You) page, (and answer
'yes' to the 'Repost Data' question), a second card will get submitted -
with the same information as the first. Needless to say, someone can
sit at that screen, and hit 'reload' several times and send the same
card over and over again, flooding the recipient's mailbox.
How can I avoid this?
--
H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP!
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
Director of Internet Operations / SysAdmin . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6
http://www.pcraft.com ..... . . . Boulder, CO 80303,
U.S.A.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net