Page 1 of 1

redirecting

Posted: Sun May 30, 2004 2:54 am
by pixelwraith
is it possible to redirect other than in the header?
eg if i have code like:


if (....)
{ redirect}

else
{}

:)

Posted: Sun May 30, 2004 3:06 am
by PrObLeM
header('Location: file.php');

Posted: Sun May 30, 2004 6:31 am
by mudkicker
you can use meta tags for redirect as well, but header is of source better..

Posted: Sun May 30, 2004 10:11 am
by dull1554
if you want to use header redirect after output, you can use output buffering ob_start()

Posted: Sun May 30, 2004 8:29 pm
by tim
you can do a location.replace via JS

works just as good and you dont have to tamper with the buffering.