Hi All
Can anyone help me, if user inactivity and update my datbase row automaticlly ( I mean time set if user inactivity or browser close )
Before login
$sql = "UPDATE register set logged_in='1' WHERE (matri_id='" . $username . "' OR email='" . $username . "')";
$DatabaseCo->dbLink->query($sql);
After login
$sql = "UPDATE register set logged_in='0',last_login = '" . $_SESSION['login_time'] . "' WHERE matri_id='" . $_SESSION['user_id'] . "'";
$DatabaseCo->dbLink->query($sql);