I'm currently writing a CMS/Users Script and im using sessions, But ive came accross a slight problem... And thats to tell if a user is online? Or even show a list of users that are online!
I sorta know what I need to do, And that is when someone logs in, It stores their name and the time when they logged in, in a mysql table. And everytime they goto a different page it updates the time on the mysql table...
But im having my doubts, Like what if the session expires? How will the script know to take the user of the table?
if anyone could tell me that would be a great help,
Thanks in advance, Atomiku.
PS: Shall I just not use sessions at all? And try some other way? Like storing sessions on a mysql table... Oh i just dont know 🙁