prepare("DELETE FROM users WHERE id = :id");
$query->bindParam(':id', $_SESSION['user_id']);
if($query->execute()) {
echo '
Account successfully deleted
';
unset($_SESSION['user_name']);
unset($_SESSION['user_id']);
} else {
echo 'Account deletion failed
';
}
}
header("Refresh: 2; URL={$config['urls']['base']}");
require_once(TEMPLATES_PATH . "/footer.php");
?>