EXUCUTING THIS LINE header("Location: http://intra01/php/default.php?showpage=" .$_SERVER[PHP_SELF]);
GOT THIS
Warning: Cannot add header information - headers already sent by (output started at D:\inetpub\wwwroot\php\includes\Is_from_home_page.php:2) in D:\inetpub\wwwroot\php\includes\Is_from_home_page.php on line 5
WHAT IS THE BEST WAY TO REDIRECT
can you post your code for the eintire page .... It would better help us to solve the problem! Thanks
very likely you wrote output before the header()
no html code, echo, print statements etc, or even blank lines before using header()
THIS THE ENTIRE PAGE
<? if (empty($GET['nordir'])){ Header("Location: http://intra01/php/default.php?showpage=" .$SERVER[PHP_SELF]); exit; }
?>
is a page that checks the header contains 'nordir' if 'nordir' is not found then redirect it.
help
Always ensure that you have not printed anything to the clients browser before the header()
Anything as minor as a space printed to the browser before the header() can cause this problem.