public static function logout(){
DB::query("DELETE FROM webchat_users WHERE name = '".DB::esc($_SESSION['user']['name'])."'");
$host="localhost";
$username="";
$password=""; $db_name="test";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$ss = $_SESSION["myusername"];
//Update Member Status
$sql_update_status = "Update members SET Status = 'Logout' where username = '$ss' ";
$result2=mysql_query($sql_update_status);
$_SESSION = array();
unset($_SESSION);
return array('status' => 1);
}