<?php

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

$referencia = $_POST['referencia_producto'];
$id = $_POST['id'];

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

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

   

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