Existing images disappear when updating
Help!
All pages created with DA. Followed directions for adding DFP to DA Insert and Update pages.
The Insert works fine. The files are uploaded and display on the results (thumbnail) and Detail (full size) and datbase gets an entry in the field.
The problem comes when any field on the form is updated. Unless the image file is re-browsed and uploaded, the image is not displayed on the Results and Detail and the database (thru myPHPAdmin) has been returned to NULL.
Thanks in advance.
Below is the code from the php portion of the update page
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../himages/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "4",
'ResizeWidth' => "400",
'ResizeHeight' => "266",
'ResizeFillColor' => "#FFF5cc" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "../himages/thumb",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "4",
'ResizeWidth' => "140",
'ResizeHeight' => "104",
'ResizeFillColor' => "#FFF5cc" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "Image1update", "0", "", "true", $WA_UploadResult1_Params);
}
?>
Markup
<td class="WADADataTableCell"><input type="hidden" name="Image1" id="Image1" value="<?php echo(str_replace('"', '"', $row_WADAproperty['Image1'])); ?>" size="32" tabindex="6" />
<br />
<label>
<input type="file" name="Image1update" id="Image1update" />
</label></td>