include('../db.php'); $id=$_GET['id']; $id2=$_GET['id2']; $qryfot=mysql_query("select * from foto where fo_id='$id'"); while($rowfot=mysql_fetch_array($qryfot)){ if ($rowfor!='no_images.jpg'){ unlink( "../fotos/".$rowfot['foto']); unlink( "../miniaturas/".$rowfot['foto']);} $listado=$rowfot['fo_listado'];} $qry=mysql_query("delete from foto where fo_id='$id' LIMIT 1"); header("Location:formulario.php?id=$id2"); ?>