<?php
session_start();

$servername = "localhost";
$username = "itladevprubycom_enma";
$password = "53gNpj4t.xDc";
$database = "itladevprubycom_enma1";

$conexion = new mysqli($servername, $username, $password, $database);

if ($conexion->connect_error) {
    die("Error de conexi贸n: " . $conexion->connect_error);
}

if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["id"])) {
    $id_eliminar = $_GET["id"];
    $eliminar = $conexion->prepare("DELETE FROM historial WHERE id = ?");
    $eliminar->bind_param("i", $id_eliminar);
    $eliminar->execute();
    header("Location: historial.php");
    exit();
}

?>