<?php
require '../config.php';
require '../functions.php';
checkLogin();

if (!isset($_GET['id'])) die("No car ID provided.");

$stmt = $pdo->prepare("DELETE FROM cars WHERE id = :id");
$stmt->execute(['id' => $_GET['id']]);

header("Location: dashboard.php");
exit();
