RE: Location ....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
Could you tell me a efficient solution for change page (new location) in
PHP? I tried this code : header("Location: mypage.php");

But in some case, I have error message "heade already send". Then I use a
javascript solution : window.location.href="mypage.php";

Is there a good solution in php ?
[/snip]

Header is a good solution, and is the only one available in PHP for
redirects. It requires that you do not send anything else out to the
browsers before sending the redirect, which is what is causing your error.
You can always use the output buffer functions to assist with that.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux