Hello!
I've written a small program in PHP out of a book. It involves making cookies. The book is about PHP3 and on my server I have PHP4.
When I run the code I get this error:
Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/sunesha.nu/httpdocs/test/added_items.php:5) in /home/httpd/vhosts/sunesha.nu/httpdocs/test/added_items.php on line 22
the code on that line looks like this:
setcookie ("items_tray[$total_items]", $selected_item_no);
I wonder if there are any big difference between PHP3 and 4 when it comes to setting cookies. Or is it maybe some settings on the server that is wrong?
Hope you understand my problem. Just reply and ask for more info if you like.
Thanks.
Best regards,
Emil Hansson