View Full Version : Setting a Cookie

08-14-2007, 11:47 AM
Anytime i try to set a cookie within my script i'm getting this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/fantasy3/public_html/ichuson/includes/html.php:5) in /home/fantasy3/public_html/ichuson/login.php on line 75

08-14-2007, 12:24 PM
Set the cookie before you do anything else on the page in question.

08-14-2007, 01:19 PM
umm, but i inlclude my layout at the top of each page =X

08-14-2007, 02:54 PM
Set the cookie before you output anything else. If you have to include the template first look into output buffering. http://www.php.net/ob_start

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum