I want to destroy session if users are not doing any kind of activity on website. At that time after 5 users automatically redirect on index page. How is it possible? Is pos
In index.php in dashboard.php if(time() - $_SESSION['loggedAt'] > 240) { echo""; unset($_SESSION['username'], $_SESSION['loggedAt']); header("Location: " . index.php); exit; } else { $_SESSION['loggedAt'] = time(); }