Page 1 of 1

Redirecting a page

Posted: Wed Dec 18, 2002 6:34 am
by feiticeir0
Hi! How can i redirect the browser automaticaly to another page ?

example:
in the login, is the administrator, and, by a switch condition
i want the browser to go to another page


"if (login == administrator)
goto another page ...

how to do this ?

regards,
Bruno Santos

Posted: Wed Dec 18, 2002 6:42 am
by evilcoder
<?php

if ($login == 'administrator')
{
header("Location: http://theaddress.com");
exit;
}
else
{
header("Location: http://wrongloginaddress.com");
exit;
}

?>

Posted: Wed Dec 18, 2002 12:39 pm
by Takuma
Before using the function don't forget to read

viewtopic.php?t=1157