Okay I get this error for a little member script I made (its pretty much just using the same database and functions as the forums, except it allows you to log in and register etc on the site)
The error i get is:
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site34/fst/var/www/html/index3.php:23) in /home/virtual/site34/fst/var/www/html/memberadmin/functions.php on line 1611
it is above my little script thing that says Welcome Mistah Roth [login] [register]
Here is the memberadmin/functions.php area where the error is coming from.
if (defined('USE_COOKIE_WORKAROUND')) {
// It's been reported that there's a bug in PHP 4.2.0/4.2.1 with Apache 2 causing setcookie() to not work correctly.
// This is the workaround. If you need to use this code, please add:
// define('USE_COOKIE_WORKAROUND', 1);
// to your config.php.
if (!$value) {
// need to do this so IE deletes the cookie correctly
$expire = time() - 31536001;
$value = 'deleted';
}
$cookieheader = "Set-Cookie: $name=".urlencode($value);
if ($expire) {
$cookieheader .= '; expires='.gmdate('D, d-M-Y H:i:s', $expire).' GMT';
}
if ($cookiepath) {
$cookieheader .= "; path=$cookiepath";
}
if ($cookiedomain) {
$cookieheader .= "; domain=$cookiedomain";
}
if ($secure) {
$cookieheader .= '; secure';
}
header($cookieheader, false); // force multiple headers of same type
} else {
setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
}
}
line 1611 is setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
Im asumming it means the cookie has already been set, and so it doesn't need to set another one. Is there a way I can get it to check if its already been set? so if it has I can bypass the part making the error, or if the error isnt really important and doesn't effect the program is there a way for me to make it go away?