[thelist] PHP help required please

Bill Haenel bill at webmarketingworx.com
Sun Feb 3 10:35:01 CST 2002


I've run into this before when I just couldn't find anything that was
outputting to the browser (I thought). Turned out to be an extra line break
at the end of a functions sheet I was include()-ing. Although none of the
functions were being processed, the line at the end of the sheet that I
hadn't noticed before was being 'included' as whitespace and thus being sent
to the browser before the setcookie() - so beware of sneaky stuff where you
least expect it.

BH

> Any setcookie() or header() code *must* be placed before any output is
> made by php.. In other words: no spaces, etc, etc. can be outside the <?
> ?> brackets prior to using those header commands... It sounds like
> you've either got some html, or a simple space before them...
>
>
> > basically, the problem is that no matter which of these I use,
> > I get the same error message:
>
> > Warning: Cannot add header information - headers already sent
> > by (output started at
> /home/sites/site108/web/mrw/customers/login.php:3) in
> > /home/sites/site108/web/mrw/customers/login.php on line 3




More information about the thelist mailing list