Is there a way to delete an image that is associated with a record without deleting all the images from image folder?
What I want to do is to when ever I need to delete a record, the image that is associated with the record needs to be deleted as well. All the treads that people have posted are for deleting multiple images. The following code below deletes all of images which is not what I want.
<?php if(isset($_POST['deleteProduct'])) { ?>
<?php do { ?>
<?php
$WA_DeleteFileResult1 = false;
if(isset($_POST["deleteProduct"]) || isset($_POST["deleteProduct_x"])){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("../../store/images/", "".$row_rsInventory['ProductImage'] ."");
}
?>
<?php } while ($row_rsInventory = mysql_fetch_assoc($rsInventory)); ?>
<?php } ?>