Friends, I am new to AngularJS and need your help to solve an issue. I created a session in PHP after passing ID & Pass from ANGULAR ... it works fine but the session is not terminated if browser is closed. Friends can u guide me how to fix this issue?
SESSION.PHP
$user = json_decode(file_get_contents('php://input'));
$UserTryName = $user->username;
$UserTryPass = $user->password;
$IDcheck = $mysqli->query("SELECT role FROM users WHERE name = '$UserTryName' AND password = '$UserTryPass' ");
$row_cnt = $IDcheck->num_rows;
if($row_cnt > 0) {
while($row = $IDcheck->fetch_array()) {
session_start();
$_SESSION['uid'] = uniqid('ang_');
print $_SESSION['uid'];
}
}