<?php
require_once "../../config/db.php";

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $id = intval($_POST['id'] ?? 0);

    if ($id > 0) {
        $stmt = $conn->prepare("DELETE FROM utilisateurs WHERE id=?");
        $stmt->execute([$id]);
    }

    header("Location: /eagle_client_istanbulcups/index.php?page=utilisateurs");
    exit;
}
