> Warning: Cannot add header information - headers already sent by
> (output started I understand that one of the reasons for this erro
> message is if their is a trailing space after a ?>. I have some PHP
> code which produces javascript rollover code. Above this there are a
> few includes referencing database and authorization files. Then I
> there is this peice of code

Well, JavaScript is client-side stuff which is of course output.  You
cannot have anything that needs to set an http header.  Such as Header(),
SetCookie() or session_start().

You can use output buffering to get around this limitation, but it is
somewhat expensive.  Your best bet is to modify your logic so anything
that needs to send a header happens before any output at all.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to