black_orb
Jul 30th, 2003, 01:08 AM
hey everyone, i am looking for some help with the set cookies command in PHP. I searched the forum to see what came up and found some help on the error i was getitng but nothing that pertained to my certain sittuation that i could see. I am getting this error:
Warning Cannot add header information - headers already sent by...
Now from what i read on this forum this was caused by either a space before or after the set cookie command or output (print , echo etc) before the SetCookie function is executed, but my program has neither of these problems.. here is some of the code (the 3 or 4 lines where the error is occuring):
if($pword==$pass) {
$info="$uname;$pword";
setcookie("User",$info, time()+86400);
ShowForum();
}
Could it be because i am calling the ShowForum function after, i elliminated the $info variable and the ShowForum call to see if that was the cause and i got nothing.. ne suggestions?
Warning Cannot add header information - headers already sent by...
Now from what i read on this forum this was caused by either a space before or after the set cookie command or output (print , echo etc) before the SetCookie function is executed, but my program has neither of these problems.. here is some of the code (the 3 or 4 lines where the error is occuring):
if($pword==$pass) {
$info="$uname;$pword";
setcookie("User",$info, time()+86400);
ShowForum();
}
Could it be because i am calling the ShowForum function after, i elliminated the $info variable and the ShowForum call to see if that was the cause and i got nothing.. ne suggestions?