i need some help about $_session. My team have develop an Web-Application and there are a problem that i cannot get the user_id on the $_session['user_id']? on the mailing view:
if(isset($_SESSION['user_id'])&&$_SESSION['angemeldet']){
$objModel = new MAILING();
$id=$_SESSION['user_id'];
and on the login part:
if ($login_success) {
//die();
$_SESSION['angemeldet'] = true;
$_SESSION['user_email'] = $login_success['user_email'];
$_SESSION['user_role'] = $login_success['role'];
$_SESSION['user_id'] = $login_success['user_id'];
if ($login_success['role'] == 'admin'){
header('Location: ?page=admin');
}else{
header('Location: ?page=home');
}
}
the problem that if i try the codes on localhost, it work perfectly and on the server $_SESSION['user_id'] is somehow like empty??
could someone help me? thx b4.