<?php
@session_start();
include('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();

?>

<script>
    window.location.href='../login.php';
</script>