<?php
require "../../db.php";

$id = $_GET['id'] ?? null;
if (!$id) {
  http_response_code(400);
  exit;
}

$stmt = $conn->prepare("DELETE FROM merch_categories WHERE id=?");
$stmt->bind_param("i", $id);

if (!$stmt->execute()) {
  http_response_code(500);
}
