Warning: Cannot modify header information...
Posted: Thu Feb 19, 2004 1:46 pm
ok here is the error in full:
Warning: Cannot modify header information - headers already sent by (output started at /getcookie.php:4) in /getcookie.php on line 46
I have been Searching for days on solutions that may fix this problem and people always lead back to the header, see the funny part is that im not touching the header, i think the problem maybe that im trying to use a second cookie and i am also using sessions, im using phpbb and i am making a second login for my main site so that they are integrated, the error always occurs when the script trys to set the cookie. here is the actual code, any help would be greatly appreciated.
if (($username == $user) && ($p == "3")) {
$check = "1";
echo "Full Access";
setcookie ("admin","admin1");
}
To help you all understand my coding $username is the name they entered into the login field and $user is the username set inside the database, $p is the permission level.
Warning: Cannot modify header information - headers already sent by (output started at /getcookie.php:4) in /getcookie.php on line 46
I have been Searching for days on solutions that may fix this problem and people always lead back to the header, see the funny part is that im not touching the header, i think the problem maybe that im trying to use a second cookie and i am also using sessions, im using phpbb and i am making a second login for my main site so that they are integrated, the error always occurs when the script trys to set the cookie. here is the actual code, any help would be greatly appreciated.
if (($username == $user) && ($p == "3")) {
$check = "1";
echo "Full Access";
setcookie ("admin","admin1");
}
To help you all understand my coding $username is the name they entered into the login field and $user is the username set inside the database, $p is the permission level.