The default value of an uploaded image is being removed when the form is submitted without making a change to the uploaded image.
When I use the upload file scripts the database value is being removed whenever the form is updated again without uploading another file. The default value from the database is not being applied.
Here is the code:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../pageimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "".($WADApages_update->getColumnVal("pageTop")) ."",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update"]) || isset($_POST["Update_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "pageTop", "0", "", "false", $WA_UploadResult1_Params);
}?>