<?php 
if (empty($_POST['ticked_id'])) {
           $errors[] = "Ticket vacío";
        } else if (
			!empty($_POST['ticked_id'])
		){
    include "../config/config.php";//Contiene funcion que conecta a la base de datos
    
    $id=mysqli_real_escape_string($con,(strip_tags($_POST["ticked_id"],ENT_QUOTES)));
    
    
    $sql= "DELETE FROM tickets WHERE id=$id";
    
    $delete_ticket = mysqli_query($con,$sql);
			if ($delete_ticket){
				$messages[] = "El ticket ha sido borrado correctamente.";
                print("<script>window.location='./registrados.php'</script>");
            }else{
                $messages[] = "Algo ha salido mal.";
            }
}
?>