Exemplo n.º 1
0
<?php

require_once '../db.php';
$Database = new DbUtil();
$userName = $Database->getUserName();
if ($userName == null) {
    header('Location: ../login.php', true, 303);
    exit;
}
$Database->logout();
$Database->deleteUser($userName);
header('Location: ../index.php', true, 303);