<?php
require_once __DIR__ . '/../includes/functions.php';
requireAdmin();
$id = intval($_GET['id'] ?? 0);
if ($id > 0) {
    $db = getDB();
    $stmt = $db->prepare("DELETE FROM users WHERE id = ?");
    $stmt->execute([$id]);
}
header('Location: list.php?deleted=1');
exit;
