How can I check a session is ended on client side or not? I am storing session Ids on a table in MySQL and I want to delete all sessions Ids (rows) if the session id does not exist.
<?php
session_start();
?>
How can I check a session is ended on client side or not? I am storing session Ids on a table in MySQL and I want to delete all sessions Ids (rows) if the session id does not exist.
<?php
session_start();
?>
you cant! but you can get the info about how long the session will stay by checking the php system variables about the seesion time out. Send it to the frontend an then do stuff. On the other hand: php seesions are stored on the filesystem. with root access you can find them check the creation time to calculate the deletion for your db entrys. Kind regards
One of the easiest way to check the session is destroyed or not..please follow the steps: 1. Right click on your web page than go to inspect element 2. Go to Application tab 3. on the left side you will find one option namely Cookies open this. In this you will find your site URL Click on that... After clicking on the link you will see all the session of that site..