Followup
Jason,
Do I need to change the triggering of the delete file for the 2nd and 3rd behavior? I ask because the fix worked great for the form that only had one image. I inserted a dummy record, then deleted it and the default image stays on the server.
But when I do this with the form containing the 3 images, all using the same default image, it gets deleted. I'm not sure if I am missing something in my code update. Here is the server behavior for all 4 deletes. The first three are for the first recordset (with 3 images) the 4th is is for the second recordset (with one image) and is working.
<?php
$WA_DeleteFileResult1 = false;
if(isset($_POST["Delete_x"])){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("../images/hedgehogs/", "".($row_rsAvailableHH['imagethumb1'] != "PhotoUnavailable.jpg")?$row_rsAvailableHH['imagethumb1']:"" ."");
}
?>
<?php
$WA_DeleteFileResult2 = false;
if(isset($_POST["Delete_x"])){
$WA_DeleteFileResult2 = WA_FileAssist_DeleteFile("../images/hedgehogs/", "".($row_rsAvailableHH['imagethumb2'] != "PhotoUnavailable.jpg")?$row_rsAvailableHH['imagethumb2']:"" ."");
}
?>
<?php
$WA_DeleteFileResult3 = false;
if(isset($_POST["Delete_x"])){
$WA_DeleteFileResult3 = WA_FileAssist_DeleteFile("../images/hedgehogs/", "".($row_rsAvailableHH['imagethumb3'] != "PhotoUnavailable.jpg")?$row_rsAvailableHH['imagethumb3']:"" ."");
}?>
<?php
$WA_DeleteFileResult4 = false;
if(isset($_POST["Delete2_x"])){
$WA_DeleteFileResult4 = WA_FileAssist_DeleteFile("../images/hedgehogs/", "".($row_rsStickyHH['imagethumb1'] != "PhotoUnavailable.jpg")?$row_rsStickyHH['imagethumb1']:"" ."");
}
?>
I can try creating a duplicate copy of the default image and just rename the second two if that would be better. But I wondered if I am missing anything here that would can see.
Thanks,
TroyD