<?php
require_once 'admin_config.php';
requireAdminLogin();

$id = $_GET['id'] ?? 0;

if ($id) {
    try {
        $stmt = $pdo->prepare("DELETE FROM equipment WHERE id = ?");
        $stmt->execute([$id]);
    } catch(PDOException $e) {
        // Handle error
    }
}

header('Location: products.php');
exit;
?>