File upload clearing data from table
Hi,
My file upload on my update form is not working correctly, when the form is processed if the file field is blank the field is cleared from the table so becoming a null value.
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../../misc/traders/docs/insurance/",
'FileName' => "".$_SESSION['trader_session_id'] ."_[FileName]",
'DefaultFileName' => "".((isset($_POST["insure_hidden"]))?$_POST["insure_hidden"]:"") ."",
'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_record"]) || isset($_POST["update_record_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "insure", "3", "[ExistingFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}
?>
form attached
Andy