Digital File Pro Update Page not uploading file.
Digital file pro is working on the insert page, but not the update page. It is not uploading the file, nor is it writing to the database. This is my code:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../leftImages/",
'FileName' => "[FileName]",
'DefaultFileName' => "".$row_WADAcontent['photo'] ."",
'ResizeType' => "2",
'ResizeWidth' => "150",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "photo", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Update
if (isset($_POST["Update_x"])) // Trigger
{
$WA_connection = $ec;
$WA_table = "content";
$WA_redirectURL = "content_Results.php";
$WA_keepQueryString = false;
$WA_indexField = "ID";
$WA_fieldNamesStr = "pageContent|pageTitle|menuName|sortOrder|extID|photo";
$WA_fieldValuesStr = "".((isset($_POST["pageContent"]))?$_POST["pageContent"]:"") ."" . "|" . "".((isset($_POST["pageTitle"]))?$_POST["pageTitle"]:"") ."" . "|" . "".((isset($_POST["menuName"]))?$_POST["menuName"]:"") ."" . "|" . "".((isset($_POST["sortOrder"]))?$_POST["sortOrder"]:"") ."" . "|" . "".((isset($_POST["extID"]))?$_POST["extID"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|',none,''";
$WA_comparisonStr = "=|=|=|=|=|=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_where_fieldValuesStr = "".$row_WADAcontent['ID'] ."";
$WA_where_columnTypesStr = "none,none,NULL";
$WA_where_comparisonStr = "=";
$WA_where_fieldNames = explode("|", $WA_indexField);
$WA_where_fieldValues = explode("|", $WA_where_fieldValuesStr);
$WA_where_columns = explode("|", $WA_where_columnTypesStr);
$WA_where_comparisons = explode("|", $WA_where_comparisonStr);
$WA_connectionDB = $database_ec;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$updateParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WhereObj = WA_AB_generateWhereClause($WA_where_fieldNames, $WA_where_columns, $WA_where_fieldValues, $WA_where_comparisons );
$WA_Sql = "UPDATE `" . $WA_table . "` SET " . $updateParamsObj->WA_setValues . " WHERE " . $WhereObj->sqlWhereClause . "";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>
I am also receiving an error upon submit. The error is:
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\EC\admin\adminheader.php:15) in C:\xampp\htdocs\EC\admin\content_Update.php on line 109
Update Record
I am using an included header and footer file. The header file is named adminheader.php.