His suggestion would be used before anything else in the script. (first line without any leading white space. To be honest though it is a band aid fix and you should write your code so there is no output including white space in included files before headers have been sent.
Well i sorta tried to understand the error message
Warning: Cannot modify header information - headers already sent by (output started at d:\apache\php\temp2.php:3) in d:\apache\php\temp2.php on line 5
and i the problem is that it can't even set the cookie, not that php can't read it.
i cut/pasted the exact code from a tutorial site and it still didn't work. i'm using FireFox v1.0.4
pls help
You have to set cookies before any output (echoes, prints, whitespace, normal html, etc.) or you can put
PHP Code:
<?php
ob_start();
?>
at the very start of your script before any output.
as far as I'm concerned, this is Scleppel telling him to put it before anything in his page. i guess it should have been pointed out what this means exactly.
Bookmarks