close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Default Image is being deleted.

Thread began 1/20/2010 3:45 pm by troyd | Last modified 1/25/2010 12:03 pm by troyd | 3456 views | 11 replies

troyd

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:
<?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

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...