--- Cesar Aracena <[EMAIL PROTECTED]> wrote:

> I have trouble with header("Location... because the
> browser is NOT redirected. If I set an echo statement
> after I detected that the username and password using
> $_POST[""], the echo goes OK but if I comment the echo
> and un-comment the 
> 
> header("Location: http://www.domainname.com";);
> exit;
> 
> nothing happens...

It is a good idea to always use a proper URL in conjunction with the
Location header, because this is required by the HTTP specification.
So, change your code to this:

header("Location: http://www.domainname.com/";);

However, I doubt this will solve your problem.

When you exchange the header() with an echo for debugging, you get
the output you expect, right? Is it possible that the echo is not the
only output, meaning that it would work fine whereas the header()
call would fail due to their being previous output somewhere else?
Depending on your HTML, errors might be hidden from the browser, so
you might have to glance through the source.

The only way to make sure PHP is properly changing the response
status code to 302 is to snoop the HTTP traffic surrounding this
transaction. Can you do that and show us the results? It might reveal
something.

Chris

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

Reply via email to