Author | Post | |||
sniperkid |
when someone logs in i want it; to change something on a database (done) but (fe) if they close their browser or logout then i want it to change the database (not done) any way of doing it ? login -> changes $status="Online"; logout/close/inactive for 5 mins -> changes $status="Offline"; |
|||
27.05.2005 17:40:15 |
|
|||
qwertydawom |
I guess you should first define this : define("INACTIVE_USER", 5); (if you want 5 mins fe) Hmm... I'll look further into it lol |
|||
27.05.2005 18:16:50 |
|
|||
Nedren899 |
Is it in php? I had the same problem once. I just got around it by having on each page a function to update the members "row" in the table with the current unix timestamp, time(). Then on the online page, I pull each row from the table where the "time" is greater then time() - 300, or 5 minutes. Works nicly for me. |
|||
27.05.2005 23:54:54 |
|
|||
qwertydawom |
Oh ok, thanks Yeah, it is in php |
|||
28.05.2005 06:58:36 |
|