I tried to redirect to an HTML page from a php script using
header(\"Location: http://abcd.htm\"); exit;
I got an error that said Warning: Cannot add header information - headers already sent by (output started at /home/httpd/html/blueiron/ldapSearch.php:6) in /home/httpd/html/blueiron/ldapSearch.php on line 115
Does anyone know how I could fix this. I want the html page to be brought up automatically without an href link.
Dhiren
Hi,
there can be absolutely no output before the 'header' function is called.
In other words, no html code, and no php output, before the 'header' function is called.
I guess you have some html code before the header function ?
Good luck
Header() can only be called before you send anything to the browser. So if you don't print to the browser things will be cool. Also, you don't need to escape your quotes, try
header("Location: http://abcd.htm");
Nick