file upload and file name insert not working
I'm trying to upload a file and insert the filename into the database. The file upload is not working, and the insert isn't working either. All of my other fields insert, but the filename is empty everytime.
html field is:
<input value="<?php echo($smallgroup_info->getColumnVal("picture")); ?>" type="file" id="Picture" name="Picture" style="float:left;"/><?php echo($smallgroup_info->getColumnVal("picture")); ?>
File upload code is:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "images/",
'FileName' => "".((isset($_FILES["Picture"]))?$_FILES["Picture"]["name"]:"") ."",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "Picture", "0", "", "true", $WA_UploadResult1_Params);
}
?>
Insert code is:
$InsertQuery->bindColumn("picture", "s", "".$WA_DFP_UploadStatus["WA_UploadResult1"]["clientFileName"] ."", "WA_DEFAULT");