aboutsummaryrefslogtreecommitdiff
path: root/Html/admin/logout.php
blob: dbd5586d216ea4f2fedc1614aebfe72dfcf3af61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
//include config
require_once('../includes/config.php');

//log user out
$user->logout();

//on supprime le user de la base SQL connectes
$stmt = $db->prepare('DELETE FROM connectes WHERE pseudo = :pseudo') ;
$stmt->execute(array(
    ':pseudo' => $_SESSION['username']
));


header('Location: login.php'); 

?>