<?php

include '../../../script/conexion.php';

$id = $_POST['id'];

$sql2 = "SELECT * FROM alm_novedad WHERE id='$id'";
$query2 = $conn->query($sql2);
$row2 = $query2->fetch_assoc();

$sql = "DELETE FROM  alm_novedad WHERE id='$id'";
if ($conn->query($sql) === TRUE) {

    $class_referencia = $row2['referencia_producto'];
    $class_talla = $row2['talla'];

    include '../../../clases/class-referencia.php';

    echo '<script language = javascript>
                     self.location = "../novedad.php"
                </script>';
} else {
    echo "Error: " . $sql . "<br>" . $conn->error;
}

