<?php
require_once __DIR__ . '/config.php';
requireAdmin();
$id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
if ($id) {
    getDB()->prepare("DELETE FROM products WHERE id = ?")->execute([$id]);
}
header('Location: products.php');
exit;
