0

I am working on a website in php. how do we set user status to offline in databse when he leaves website by closing browser without click on logout button.

nkmaurya
  • 53
  • 1
  • 5

1 Answers1

0
$(window).bind('beforeunload', function(){
  // Do your AJAX call here to set it to offline
});
Soader03
  • 351
  • 4
  • 20