Re: Redirection
| From: | Justin French | Date: | Mon, 23 Sep 2002 00:07:44 +0000 |
| Subject: | Re: Redirection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117214@lists.php.net to get a copy of this message | ||
Validate the input BEFORE outputting anything to the browser... this way you
have control over such problems.
<?
// validate
// code
// here
if($valid)
{
header(...);
exit;
}
?>
<HTML>
<?
if(!$valid)
{
echo "error on form";
}
?>
</HTML>
The code below exit; will only be executed if the input was NOT valid....
Regards,
Justin
on 23/09/02 9:42 AM, Sascha Braun (saschabraun@gmx.de) wrote:
> Hi,
>
> I want to post a form and after parsing i want to redirect the user to the
> home page.
>
> header() doesn't work in this circumstance, what can I do else?
>
> Greetings
>
> Sascha
>