<?php
include('db_conx.php');
$id = $_SESSION['id'];
$sql_out = "UPDATE clients SET time_logout = '$time',online = '0' WHERE id = '$id'";
$query_out = $db_conx->query($sql_out);
if ($query_out) {
	session_destroy();
	header("location: ../login.php");
}
