<?php
session_start();

if (isset($_SESSION['user_id'])) {
	include("../other/connection.php");

	$id = $_SESSION['user_id'];
	mysqli_query($con, "UPDATE `users` SET `active`=0 WHERE `user_id` ='$id'");
	mysqli_close($con);
	unset($_SESSION['user_id']);
}

header("Location: ../../../views/other/index.php");
die;
