[PHP] Avoiding repost

2001-07-26 Thread Ashley M. Kirchner


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.  BP!
  +
  Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Avoiding repost

2001-07-26 Thread Lawrence . Sheed

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:[EMAIL PROTECTED]]
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.  BP!
  +
  Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]