Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

header(location:) after headers already sent

Status
Not open for further replies.

801119

Programmer
Apr 10, 2000
311
SE
Warning: Cannot modify header information - headers already sent by (output started at D:\ in D:\ on line 98



I would sooo love to know a work around for this (other than:
print(&quot;<script language='JavaScript'>document.location=\&quot;index.php\&quot;;</script>&quot;);) which, by the way works ;P but I want to force a refresh with php/headers, or must I rewrite the darn code? ;)

My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
You cannot have any output from your script before your headers. You don't want to have output with a &quot;Location:&quot; header anyway -- that header redirects the browser instantly, so even if you could produce output and relocate the browser, your user won't see anything.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top