- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi ,
Can you tell me how to unlink multiple images to the same section…
Like :
Products -> iphone
the iphone section have 10 images when i delete this section , all images related to this
section be deleted ..
this is my code but but i don’t know where the problem
delete.php
delete_ac.php
#### Checkbox Elements .
$id = $_POST;
if (isset($_POST))
{
$impid = implode(",", $id);
$Qdell2 = mysql_query("SELECT * FROM salle WHERE sal_id IN(".$impid.")") or die (mysql_error());
$Qdell = mysql_query("DELETE FROM salle WHERE sal_id IN(".$impid.")") or die (mysql_error());
$row2 = mysql_fetch_object($Qdell2);
$mainOrignal = $row2->mainOrignal;
$path2 ="../../wed/upload/Sall/";
@unlink($path2.$mainOrignal);
//
+
$QdellPic = mysql_query("SELECT * FROM pics WHERE salle_id IN(".$impid.")") or die (mysql_error());
$QdellPic2 = mysql_query("DELETE FROM pics WHERE salle_id IN(".$impid.")") or die (mysql_error());
$row = mysql_fetch_object($QdellPic);
$th = $row->thum;
$ori = $row->orignal;
$path ="../../wed/thumb_ori_Img/Sall/";
@unlink($path.$th);
@unlink($path.$ori);
//
+
if (isset($Qdell) && isset($QdellPic2)) {
redirect_to("../index.php?up=delete");
}
}
but delete one image only
any help i appreciated …
You need to loop through the records deleting each image in turn.
that’s right and i delete before unlink ..
now every thing is OK..
thanx lyleyboy ..