...

View Full Version : Resolved Session before header.



Rihoj
01-16-2010, 11:40 PM
Ok, So I am trying to make a script that makes sure users are logged in when viewing the page, and if not, send them to the home page, and send a session variable with a code for a message that tells them they must be logged in. However this is not working



if(!checkSessions()){
$_SESSION['mcode'] = 3;
header('Location: game.php?side=news');
}


If I take out the header then the code works, however on the other page, when I try to out put all session variables to check for it. It shows it is 0, not three as it should be. Can anyone help me out here?


I found the issue, thank you all who read.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum