par
LapinBleu » 28 mai 2005, 21:20
Bonsoir !
Page listing :
<?
$Requete = mysql_query("SELECT * FROM biens);
echo "<table class=\"texte\" width=\"96%\" border=\"1\" bordercolor=\"#FFE26F\" cellspacing=\"0\" align=\"center\">";
echo "<tr>";
echo "<td WIDTH=3% align=\"center\" bgcolor=\"#FFCB1A\">Supprimer</td>";
echo "<td WIDTH=3% align=\"center\" bgcolor=\"#FFCB1A\">Photo 1</td>";
echo "</tr>";
while($Result = mysql_fetch_array($Requete))
{
echo "<tr>";
echo "<td><input type=\"button\" value=\"Supprimer\" style=\"FONT-FAMILY: Verdana; FONT-SIZE: 8pt\" OnClick=\"window.location='photos/purge.php?tof1=".$Result[tof1]."'\"></td>";
echo "<td><img height=\"60\" src=\"../../photos/photos/".stripslashes($Result[tof1])."\"> </td>";
}
echo "</table>";
?>
Le fichier de purge...
Mon pro, il supprime le fichier x.jpg sans distinction et ne fais pas le test... if ($tof1 !='x.jpg')
<?
$requete = "DELETE FROM 2_biens WHERE num=$num";
$execution = mysql_db_query("ju39988", $requete);
if ($tof1 !='x.jpg')
{
unlink($tof1);
Header("Location: rech.php");
}
?>
QQ peut me dire ou j'ai couillu ?
Merci ! Merci !
