How To update database when browser is closed???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RishikeshJha
Forum Newbie
Posts: 11
Joined: Tue Mar 31, 2009 1:54 am

How To update database when browser is closed???

Post by RishikeshJha »

Hi,

I want to update database when browser is closed automatically or user closes the browser. I am using javascript on unload event. but the problem is that when ever user navigate through other pages this javascrip function is called and user logged out automatically. I am working with php and mysql. Can any one help me


Thanks
Rishikesh
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How To update database when browser is closed???

Post by requinix »

There is no reliable way to check if/when the user has closed the browser.

Make them automatically log out after a period of inactivity.
Post Reply