PHP members Online
I have a member bases site where the user logs in and then session is set.
This code is in my top.php page:
PHP:
session_start();
$user = $_SESSION[‘user’];
$userid = $_SESSION[‘id’];
$dbuser = $_SESSION[‘user’];
$dbid = $_SESSION[‘id’];
I was wondering how I can run a mysql query whenever the user logs out, closes the tab or window. It should be a code that can do all these, but I am not sure how. I know the query to run when user logs out but not sure when user leaves the site by…
PHP members Online
See original post by shivampaw
Leave a Reply
You must be logged in to post a comment.