Hi All
i am having some problems keeping my session vars alive. i have a user log-in form which sets a session before redirecting the user to another page. In this page I check for the existence of that session var and it seems to be loosing the session as it directs users back to the log in...
Note: most of the code is in functions
Any ideas as to why this may drop sessions info?
Cat, the other other white meat
i am having some problems keeping my session vars alive. i have a user log-in form which sets a session before redirecting the user to another page. In this page I check for the existence of that session var and it seems to be loosing the session as it directs users back to the log in...
Note: most of the code is in functions
Code:
//code to check the log in and set the session var
$result = mysql_query($sql_id,$conn) or die("Can't retrieve user because ".mysql_error());
if ($result){
while($row = mysql_fetch_array($result)){
$user_id = $row['user_id'];
}
}//end if
$_SESSION['user_id'] = $user_id;
header("location:my_ads.php?a=show");
Any ideas as to why this may drop sessions info?
Cat, the other other white meat