How to detect if a user has logged out, in php?

后端 未结 12 2475
南笙
南笙 2020-12-06 02:19

After the user successfully logs in, I store login = true in database. But how do I check if the user logged out by closing the browser without clicking the logout button? A

12条回答
  •  Happy的楠姐
    2020-12-06 03:18

    AFAIK there is no way for you to check when a person closes the browser window (or leaves you page to go to another) so you need to check activity as others suggested above.

提交回复
热议问题