Re: Warning: Cannot add header information - headers already sent by
| From: | 1LT John W. Holmes | Date: | Wed, 29 May 2002 20:36:57 +0000 |
| Subject: | Re: Warning: Cannot add header information - headers already sent by | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99801@lists.php.net to get a copy of this message | ||
You can't send anything to the browser before you send a header or cookie.
Apparently, lagi.php has sent something, though, on line 4. Fix that and you
will be fine.
---John Holmes...
----- Original Message -----
From: "Anton Heryato" <anton_h@student.unri.ac.id>
To: <php-general@lists.php.net>
Sent: Thursday, May 30, 2002 6:37 AM
Subject: [PHP] Warning: Cannot add header information - headers already sent
by
> i have one function name deleteCookees that have this error message
>
> Warning: Cannot add header information - headers already sent by (output
> started at /home/reymond/html/phpreport/lagi.php:4) in
> /home/reymond/html/phpreport/delete.inc on line 10
> the script
>
> <?
> function deleteCookies()
> {
> for ($i=0; $i<$total_items; $i++)
> {
> setcookie("items_tray[$i]","");
> setcookie("quantity[$i]","");
> }
>
> setcookie("items_tray","");
> setcookie("total_items","");
> setcookie("quantity","");
>
> }
> ?>
>
> could anybody tell me why this happen and howto fixed
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>