<?php
session_start();
if (!isset($_SESSION['admin'])) { header('Location: login.php'); exit; }

require '../conexion.php';
$id = $_GET['id'] ?? 0;
$stmt = $conn->prepare("DELETE FROM consultas WHERE id=?");
$stmt->bind_param("i",$id);
$stmt->execute();
$stmt->close();
$conn->close();
header("Location: ver_consultas.php?del=ok");
exit;
?>
