Re: Re: One more 'Headers Already Sent' error. :-(
| From: | Erik Price | Date: | Wed, 26 Jun 2002 13:06:00 +0000 |
| Subject: | Re: Re: One more 'Headers Already Sent' error. :-( | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103949@lists.php.net to get a copy of this message | ||
On Tuesday, June 25, 2002, at 06:07 PM, Brad Melendy wrote:
Well, I have traced this down to line 4 in the following code 'include("header.html");' which just includes my navigation bar. If I comment it out, everything works great, if I leave it in, I get the error Headers Already Sent. The file it purely html. What could be the problem?? Thanks in advance!You want this script to redirect twice? Or do you just want it to redirect the first time, but have the second header() function be called if the first one doesn't? Then you should call exit() after the first header() function to keep the rest of the script from executing. This is also generally a good practice after a header('Location: ') call because the user-agent doesn't HAVE to respect the header and redirect, so it protects your stuff. Always feature an exit() with a header-based redirect. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com