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
You may create a cookie for a specific time. For example you could put this on your login page:
Then in some file part that is included in every page, like 'header.php', you may include:
location.href='logout.php'; ";
}
setcookie('admin', 'abc', time()+50);
?>
In the above example, after 50s the cookie will die and the user will be logged out automatically.