View sourcecode

The following files exists in this folder. Click to view.

logout.php

18 lines ASCII Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
    session_start
();
    if(isset(
$_GET['action'])){
    switch(
$_GET['action']){
        case 
'logout':
            
session_unset();
            
session_destroy();
            break;
        case 
'cookie':
            
session_unset();
            
session_destroy();
            
setcookie('remember'''time() - 1);
            break;
    }
    
header('location: index.php?mess=logout');
    exit();
}
?>