RE: Re: [Repost] Getting rid of "Web page has expired" (POSTDATA Error)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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@xxxxxxxxxxxxx
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: ");

}

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux