Re: warning setcookie

From: Date: Thu, 11 Mar 2004 15:36:11 +0000
Subject: Re: warning setcookie
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26296@lists.php.net to get a copy of this message
Julien, julien_linux@tiscali.fr wrote:
Warning: Cannot add header information - headers already
sent by (output started at /var/www/html/cookie.php:2) in /var/www/html/cookie.php on line 27
Warning: Cannot add header information - headers already
sent by (output started at /var/www/html/cookie.php:2) in /var/www/html/cookie.php on line 28
This mailing list is for PEAR-related activities. Please visit #php on freenode IRC if you need help. That said, cookies are sent with HTTP headers, so need to be set before the body of the HTML document. Either make sure your cookies are set before you send "<!DOCTYPE H ..." or look up output buffering at php.net. Note that it doesn't matter where you define the function, it's where you call it that is causing your errors. Regards, David

« previous php.pear.dev (#26296) next »