Fw: [PHP] Re: headers and cookies
| From: | Kevin Stone | Date: | Tue, 29 Oct 2002 21:07:39 +0000 |
| Subject: | Fw: [PHP] Re: headers and cookies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121948@lists.php.net to get a copy of this message | ||
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
----- Original Message -----
From: "rolf vreijdenberger" <rolfvreijdenberger@hotmail.com>
To: <php-general@lists.php.net>
Sent: Tuesday, October 29, 2002 1:59 PM
Subject: [PHP] Re: headers and cookies
>
> but are you really sure that you cannot use setcookie() and header() at
the
> same time??
> I cannot find it anywhere, either in the manuals or in tutorials or in the
> output control functions!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>