Re: headers already sent and cookie problem
| From: | Ryan Gibson | Date: | Tue, 15 Jul 2003 09:04:00 +0000 |
| Subject: | Re: headers already sent and cookie problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155247@lists.php.net to get a copy of this message | ||
You cannot send any page information before you send headers (ie setting a
cookie), that means there should be no html before the php that sets the
cookie, also any function that are called before you set the cookie cannot
output to the browser.
Ry
On 15/7/03 9:45 am, "frederik feys" <frederikfeys@pandora.be> wrote:
> Hi all,
>
>
>
> This is what i get:
>
> ³Warning: Cannot add header information - headers already sent by (output
> started at /home/u/r/html/store/cart.php:188) in
> /home/u/r/html/store/includes/functions/get_cartID.php on line 14²
>
>
>
> I know that the problem is the reading of the cookie and then after some
> sripting outputting page HTML.
>
>
>
> I started my code
>
> ob_start()
>
> and do an ob_flush() within a function(show_cart) (?might that be a problem?)
>
>
>
> Can anyone shed some light on this?
>
>
>
> Thanks!
>
> Fred
>
>
>
>
Ryan Gibson
-----------
ryan_gibson@jmp-partnerhip.co.uk