<?php
include "../conexion.php";
if(!empty($_GET)){
	$seap_id=$_GET["seap_id"];

	$can1=mysqli_query($con,"SELECT * from seriales_apartados where seap_id='$seap_id'") or die(mysqli_error($con)); 
    $num=mysqli_fetch_array($can1);

    $serial=$num['sear_codigo'];

	$seractu=mysqli_query($con,"UPDATE seriales_articulos Set estado='sin vender' Where se_codigo='$serial' ") or die(mysqli_error($con));

	$sql=mysqli_query($con,"DELETE FROM seriales_apartados WHERE seap_id='$seap_id'") or die(mysqli_error($con));

	
}
?>