RE: [PHP] Re: [Repost] Getting rid of "Web page has expired" (POSTDATA Error)
| From: | Robert Samuel White | Date: | Thu, 18 May 2006 20:27:02 +0000 |
| Subject: | RE: [PHP] Re: [Repost] Getting rid of "Web page has expired" (POSTDATA Error) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236439@lists.php.net to get a copy of this message | ||
[SNIP]
Now one thing bothers me: how do you redirect in step 4 if you have shown
the form in step 3?
How do you avoid a "Cannot modify header information - headers already sent
by ..." error message?
Nicolas Verhaeghe
E-mail: nicolas@whiteecho.com
Phone: 602-490-8000
[/SNIP]
Nicholas,
As long as you haven't outputted anything from your script after the form
post, you can redirect just fine.
Step 3 and Step 4 are two different steps.
You need something like this:
if (isset($_POST["btnSubmit"]))
{
// validate form
}
if (!$form_passes_validation)
{
// show form
} else
{
Header("location: ");
}