Hi, I am working on a chat program.
When a user logs in, a value in the database is set to 1 (online), and when he/she logs out it is set to 0 (offline).
The problem is, when the user exits the browser, naturally the value is still set to 1.
I was wondering if it is possible using AJAX or otherwise to update the database on the event of browser close?
If anybody has any advice, please help me it is driving me mad and is the biggest problem standing in my way to get the app to work...thanks you very much in advance for any replies :)
All 7 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.