on 01/08/02 3:42 AM, Petre ([EMAIL PROTECTED]) wrote:

> Well, OK, then, How do you  design the app NOT to allow the form to POST
> again when the user hits "BACK"

The PHP script that process' the form submission shouldn't be an actual page
that sends stuff to the browser.

1. form.php POSTs to parse.php

2. parse.php validates the submitted data, adds stuff to DBs, emails people,
whatever, then does a header('Location: thanks.php') redirect (not
outputting anything to the browser).  if there's a an error in the data, it
redirects back to form.php with an error message.

3. thanks.php says thanks for submitting the form

When they hit "back" from thanks.php, they get the form again, and would
have to click submit again to repost.  When they click forward, they get the
thankyou page.  Since the script that adds stuff to the DB was never on the
browser, it's impossible to refresh it and double-post.


If you work on it, this can actually all be done within one php script,
rather than 3.


Good luck,

Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to