Alex Hogan <mailto:[EMAIL PROTECTED]>
    on Friday, February 13, 2004 1:10 PM said:

> if($login == "successful"){
>       $url = "yourin.php";
> }
> else{
>       $url = "tryagain.php":
> }
> 
> header("Location: $url");

don't forget the rest of the url and don't forget to exit like matt
said...

i suggest defining a constant somewhere and including it (a configuarion
file perhaps????):

define("WEB_ROOT", "http://myhappydomain.com/";);

it can then be used like:

header("Location: ".WEB_ROOT."$url"); exit;


you can even take it one step further and make a function out of it.

function redirect($url)
{
        header("Location: ".WEB_ROOT."$url);
        exit;
}


use it thusly:

redirect($url);



hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to