No es un directorio, quiero borrar un registro de una BD, estos registros tienen entre 1 y 3 fotos, loq ue gusrdo en la BD es el nombre del archivo (foto_x.jpg) y con el siguiente código elimino el registro y las fotos asociadas:
Código PHP:
<?
include("../../conex.php");
$link=Conectarse();
$ID=$_GET['ID'];
$result=mysql_query("delete from propiedades where ID=$ID",$link);
$path="../../fotos";
if($nomfoto1 != "no_foto1.jpg")
$file1=$path."/".$nomfoto1;
unlink($file1);
if($nomfoto2 != "no_foto2.jpg")
$file2=$path."/".$nomfoto2;
unlink($file2);
if($nomfoto3 != "no_foto3.jpg")
$file3=$path."/".$nomfoto3;
unlink($file3);
header("Location:borrar_bd.php");
?>
Esop... gracias