...

View Full Version : Setting a Cookie



ole90
08-14-2007, 12:47 PM
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

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

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

Inigoesdr
08-14-2007, 03: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