Re: Setting Cookies
| From: | Jeremy Reed | Date: | Mon, 10 Dec 2001 18:46:43 +0000 |
| Subject: | Re: Setting Cookies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77216@lists.php.net to get a copy of this message | ||
You are getting that error because you have sent output to the browser
BEFORE you try to set the cookie information. When dealing with cookies, it
is important to do all processing before sending any output to the browser.
Jeremy Reed
"Steve Osborne" <s.osborne@chinookmultimedia.com> wrote in message
news:002b01c181b2$52343700$6e00a8c0@chinook.ualberta.com...
> I am attempting to use the SetCookie command. I receive the following
> error:
>
> Warning: Cannot add header information - headers already sent by
> ....(reference to current page)...
>
> At this point I have authenticated the user, and am trying to set the
cookie
> before redirecting them to the registered users section. Should I be
> setting the cookie on the top of the page that I am sending them to?
>
> Any comments or suggestions would be greatly appreciated.
>
> Steve Osborne
> s.osborne@chinookmultimedia.com
>
>