Re: Redirection
| From: | Sascha Cunz | Date: | Mon, 23 Sep 2002 01:53:03 +0000 |
| Subject: | Re: Redirection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117224@lists.php.net to get a copy of this message | ||
And also avoid including scripts that contain a linebreak or a space after any
'?>'. When I did this first time, it took me ages to find out what was
wrong... :-)
Sascha
Am Montag, 23. September 2002 02:07 schrieb Justin French:
> 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