"Gabe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is the following code the best way to redirect someone to a different
> page using PHP?
>
> <?php
> header("Location: http://www.yahoo.com");
> ?>
>From personal experience I can recommend putting "exit;" behind a header()
redirect to absolutely make sure that no code is executed afterwards in the
script:
header("Location: http://www.yahoo.com"); exit;
Without "exit;" the header redirect soemtimes didn't work for me.
Regards,
Torsten Roehr
>
> I looked for a "redirect" function of some kind and didn't come up with
> anything. Just curious what the consensus is...
>
> Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php