I am trying to get a user/password login page to work using the global $_SESSION. I am running 4.3.2 version of php, I use to use the old register_session but I believe you need to have some global turned on that is not recommended (I forget what this is exactly).
This all seems to work in all the browsers I tested except on a Explorer for PC.
Anyway, Here is some of my code:
function check_valid_user()
{
global $valid_user;
if(empty($_SESSION['valid_user']))
{
echo"YOUR NOT LOGGED IN!";
exit;
} else {
return 1;
}
}
/**** LOGIN PAGE ****/
if($user && $pass){
if (login()){
$_SESSION['valid_user'] = $user;
check_valid_user();
//..... the page that will be accessed
} else {
echo " your not logged in";
}
}
/**** KEEPING THE SESSIONS TO NEW PAGES ****/
session_start();
check_valid_user();
//.. page content
If anyone has any idea why this is not working on Explorer, I would appreciate the help. Thanks for you time.