<?php



		//get user id
	   $user_id = get_user_id();

	   $q = "UPDATE students_nce SET online_status = '0', last_logout = NOW() WHERE id = '$user_id'";
	   $r = mysqli_query($dbc, $q);

	   $_SESSION = array(); // delete all session variables

	   session_destroy();// destroy the cookies


		  unset($_COOKIE['vstoox']); //destroy the cookie too
		  unset($_COOKIE['lstoox']); //destroy these cookeis

	   setcookie(session_name(),'',time()-180);
	   header("Location: index.php?msg=lgt");

	   exit();

?>
