Hey Guys,
So, I've successfully created my own little CMS ... but, I'm stuck on something. I want to be able to manage other users, but more specifically want to know WHEN they are online and WHEN they aren't online.
This is the session I'm creating to authenticate the user:
<?php
session_start();
if(!isset($_SESSION['MEMBER_NO']) ||
(trim($_SESSION['MEMBER_NO'])=='')) {
header("location: login.php");
exit();
}
?>
MEMBER_NO is the only session variable I've created... but, how can I get this script to send data to MySQL that displays WHEN they're online, and when they aren't online... (if that makes sense)
Or in other words, how can I get this script to send data to MySQL (in real-time) to check whether the session is or isn't present?
Would I need to create a session/cookie that would update or something? I'm stumped...
All help is hugely appreciated!