Page 1 of 1

problem creating cookies - "Cannot add header .."

Posted: Wed Nov 08, 2006 4:27 am
by eyal
Hi,

When I'm trying to use a cookie I'm getting the following error:

Code: Select all

Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\direct_site\try3\between1to2.php:3) in c:\apache\htdocs\direct_site\try3\between1to2.php on line 44
I'm runing the PHP pages on my Computer using Apache server installed by PHPTriad.

When I'm runing blank page with nothing but this line everything works well. I wrote the follwing line:

Code: Select all

setcookie("sdfds", "blabla", time()+3600);
Thanks!

Posted: Wed Nov 08, 2006 4:36 am
by aaronhall

Posted: Wed Nov 08, 2006 5:17 am
by eyal
Thanks!

Posted: Wed Nov 08, 2006 5:20 am
by aaronhall
:wink: