Page 1 of 1
redirect url through parameter
Posted: Thu Dec 29, 2005 11:18 pm
by jaylin
i want to redirect from the parameter (login.php?url=main.php).
plz
Posted: Thu Dec 29, 2005 11:25 pm
by Charles256
hum.do a switch statement before all output which results in using the link as part of a header command.... need a specific example or is that enough to get ya thinking in the right direction? let me know

Posted: Thu Dec 29, 2005 11:36 pm
by AKA Panama Jack
Code: Select all
header("location: http://www.yourwebsite.com/" . $url . "\n");
Just make sure that is the only output being sent to the browser.
Posted: Fri Dec 30, 2005 12:41 am
by josh
I don't think the \n is needed on the header, PHP does that for you
Posted: Fri Dec 30, 2005 12:55 am
by jaylin
although there is "url" parameter in the address, but, when i use isset method to check exit or not. i always return false. (it return true in the body tab) however, if i want to use header method, it must be in the very first of the page. how can i solive it?