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

$id = $_GET["id"] ?? null;
if ($id) {

    // Then delete product
    $stmt = $pdo->prepare("DELETE FROM case_studies WHERE id = ?");
    $stmt->execute([$id]);
}

header("Location: index.php");
exit;
?>