What is the proper way to indicate in your db when a user is logout of an application.
session::start();
$username = session::check()["username"];
$link->query("UPDATE admin SET isOnline = 0 WHERE username = '".$username."'");
session::destroy();
exit;
This is my current implementation.