Hi guys, I have been working on a site and have managed to add a login script. I made an "status" script myself which tells people if a user is online or not.
I did that by using database(easiest way I could think of), when person logs in it changes the value in the table "user" in column "onoffstatus" to "Online" and when they click logout it changes it to "offline".
My problem is that if they close window or navigate away from it without clicking logout, it still says "Online". How can I fix it? I have been looking at timeouts and sessions a lot, and can't find what I am looking for.
Somethings to note:
I am using a free site host, and cannot access php.ini
I have tried to use .htaccess but don't know what to do...
I hope you guys can help me. Thanks.
-Toxikr3