<?php
@session_start();
include('./includes/config.php');

if(isset($_SESSION['user_id'])){
    $user_id = $_SESSION['user_id'];


    mysqli_query($tng_conn, "UPDATE users SET is_login=0 WHERE id='$user_id'");
}


session_unset();
session_destroy();

echo '<script>
$(function(){
    Swal.fire("Logged Out","You have been logged out.","success")
    .then(()=>{ location="../login.php"; });
});
</script>';
?>
