On Thursday 24 July 2003 11:37, Beauford.2005 wrote:

> I found one of my problems and also implemented your suggestions, and
> still the same thing. It will not redirect.
>
> The problem I found is that $_SERVER['SERVER_NAME'] does not include the
> port number. On my Win PC I am using port 800. So I changed this line
> to:
>
> $_SESSION['goto'] = "http://"; . $_SERVER['SERVER_NAME'] .":800" .
> $_SERVER['REQUEST_URI'];
>
> If I take the output from that and put it into my browser is works just
> fine, but it will not work in the script.

[snip]

>             header("Location: " . $_SESSION['goto']);
>
> If I echo $_SESSION['goto'] right after session_start() it shows exactly
> what it should be. So I am at a loss.

Have you checked your error logs? You should always, ALWAYS have error 
reporting on full, and check for errors. It could be that you're getting an 
"headers already sent sent" error.

Does it work if you have a single line script:

      header("Location: whatever_$_SESSION['goto']_is_supposed_to_be");


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
But Officer, I stopped for the last one, and it was green!
*/


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

Reply via email to