i have a question about using header("Locatio n: filename.html") ; in php
with my present code i have a few echo statements followed by header("Locatio n: filename.html") ; because i have echo
statements before header("Locatio n: filename.html") ; i am getting an error that headers have already been sent. i cannot
remove the echo statements as they are doing an important task. based on this situation i can use echo followed by the html
code for the filename in filename.html if i do this the code will run into a few 100's of lines and due to this i would like
to use [php]header("Locatio n: filename.html") ;[/php]
i have tried the following code and it works =
however if javascript is turned off this redirection will not work.
could you please suggest if there is an alternative to using echo statement first followed by [php]header("Locatio n: filename.html") ; [/php]please advice.
thanks.
Please enclose any coding within the appropriate code tags - moderator
with my present code i have a few echo statements followed by header("Locatio n: filename.html") ; because i have echo
statements before header("Locatio n: filename.html") ; i am getting an error that headers have already been sent. i cannot
remove the echo statements as they are doing an important task. based on this situation i can use echo followed by the html
code for the filename in filename.html if i do this the code will run into a few 100's of lines and due to this i would like
to use [php]header("Locatio n: filename.html") ;[/php]
i have tried the following code and it works =
Code:
echo " <form name='errorpage' action='error.php' method='post'> </form>
<script type='text/javascript' language='javascript'> document.errorpage.submit(); </script> ";
could you please suggest if there is an alternative to using echo statement first followed by [php]header("Locatio n: filename.html") ; [/php]please advice.
thanks.
Please enclose any coding within the appropriate code tags - moderator
Comment