<?php
include '../../config/conexion.php';

$id = $_GET['id'];
$stmt = $conexion->prepare("DELETE FROM categorias WHERE id = ?");
$stmt->bind_param("i", $id);

if ($stmt->execute()) {
    header("Location: ../modulos/categorias.php?mensaje=eliminado");
} else {
    header("Location: ../modulos/categorias.php?mensaje=error");
}
?>
