I think what the manual meant to say was that cookies must be sent prior to any output, which is the same restriction any other header has that you wish to set with the header() function, for example.
I have forwarded this along to the documentation team. Thanks for pointing it out.
Kevin Stone wrote:
http://www.php.net/manual/en/function.setcookie.php And I quote, "setcookie() defines a cookie to be sent along with the rest of the header information. Cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP).";If you absolutely must set cookies after you set other headers then use Output Buffering. http://www.php.net/manual/en/function.ob-start.php -Kevin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php