prepare("DELETE FROM vehicles WHERE id = ?"); $stmt->execute([$id]); header("Location: admin_vehicles.php?success=3"); exit; } catch (PDOException $e) { // Redirect with an error message header("Location: admin_vehicles.php?error=db"); exit; }