forked from space192/PiscineWeb22
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisconnect.php
More file actions
30 lines (30 loc) · 711 Bytes
/
Copy pathdisconnect.php
File metadata and controls
30 lines (30 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
include_once 'const.php';
session_destroy();
if(isset($_COOKIE["LOGGED_USER"]))
{
setcookie("LOGGED_USER", "", time()-(60*60*24*7));
unset($_COOKIE["LOGGED_USER"]);
setcookie("LOGGED_USER", null, -1, '/');
}
if(isset($_COOKIE["Prenom"]))
{
setcookie("Prenom", "", time()-(60*60*24*7));
unset($_COOKIE["Prenom"]);
setcookie("Prenom", null, -1, '/');
}
if(isset($_COOKIE["ID"]))
{
setcookie("ID", "", time()-(60*60*24*7));
unset($_COOKIE["ID"]);
setcookie("ID", null, -1, '/');
}
if(isset($_COOKIE["ADMIN"]))
{
setcookie("ADMIN", "", time()-(60*60*24*7));
unset($_COOKIE["ADMIN"]);
setcookie("ADMIN", null, -1, '/');
}
header('Location: Account.php');
die;
?>