Update problem
My only other worry is that i moved the image form fields to the bottom of the form and removed one of the fields completely (itemImage). The items recordset has the image items in there original location and includes ItemImage as below. I don't know if this is effecting the upload working or not. Now, when i click on the WA Upload File in the server behaviours i get the message.
One of your server side values is incorrect. Check for inconsistencies. So there's probably something wrong somewhere. Any help would be gratefully received.
The code looks like this:
// WA Application Builder Update
if (isset($_POST["Update_x"])) // Trigger
{
$WA_connection = $latinsite;
$WA_table = "items";
$WA_redirectURL = "items_Detail.php?ItemID=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$WA_keepQueryString = false;
$WA_indexField = "ItemID";
$WA_fieldNamesStr = "ItemID|ItemCatID|ItemCode|ItemFirstName|ItemLastName|ItemAddress|ItemCity|ItemState|ItemCountry|ItemCountryID|ItemShortDesc|ItemLongDesc|ItemPrice|ItemThumb1|ItemThumb2|ItemThumb3|ItemThumb4|ItemImage|ItemEmail|ItemPhone|ItemMobile|ItemAge|ItemAgeID|ItemHeight|ItemHeightID|ItemWeight|ItemStar|ItemRelocate|ItemEnglish";
$WA_fieldValuesStr = "".((isset($_POST["ItemID"]))?$_POST["ItemID"]:"") ."" . "|" . "".((isset($_POST["ItemCatID"]))?$_POST["ItemCatID"]:"") ."" . "|" . "".((isset($_POST["ItemCode"]))?$_POST["ItemCode"]:"") ."" . "|" . "".((isset($_POST["ItemFirstName"]))?$_POST["ItemFirstName"]:"") ."" . "|" . "".((isset($_POST["ItemLastName"]))?$_POST["ItemLastName"]:"") ."" . "|" . "".((isset($_POST["ItemAddress"]))?$_POST["ItemAddress"]:"") ."" . "|" . "".((isset($_POST["ItemCity"]))?$_POST["ItemCity"]:"") ."" . "|" . "".((isset($_POST["ItemState"]))?$_POST["ItemState"]:"") ."" . "|" . "".((isset($_POST["ItemCountry"]))?$_POST["ItemCountry"]:"") ."" . "|" . "".((isset($_POST["ItemCountryID"]))?$_POST["ItemCountryID"]:"") ."" . "|" . "".((isset($_POST["ItemShortDesc"]))?$_POST["ItemShortDesc"]:"") ."" . "|" . "".((isset($_POST["ItemLongDesc"]))?$_POST["ItemLongDesc"]:"") ."" . "|" . "".((isset($_POST["ItemPrice"]))?$_POST["ItemPrice"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult3"]["serverFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult4"]["serverFileName"] ."" . "|" . "".((isset($_FILES["ItemImage"]))?$_FILES["ItemImage"]["name"]:"") ."" . "|" . "".((isset($_POST["ItemEmail"]))?$_POST["ItemEmail"]:"") ."" . "|" . "".((isset($_POST["ItemPhone"]))?$_POST["ItemPhone"]:"") ."" . "|" . "".((isset($_POST["ItemMobile"]))?$_POST["ItemMobile"]:"") ."" . "|" . "".((isset($_POST["ItemAge"]))?$_POST["ItemAge"]:"") ."" . "|" . "".((isset($_POST["ItemAgeID"]))?$_POST["ItemAgeID"]:"") ."" . "|" . "".((isset($_POST["ItemHeight"]))?$_POST["ItemHeight"]:"") ."" . "|" . "".((isset($_POST["ItemHeightID"]))?$_POST["ItemHeightID"]:"") ."" . "|" . "".((isset($_POST["ItemWeight"]))?$_POST["ItemWeight"]:"") ."" . "|" . "".((isset($_POST["ItemStar"]))?$_POST["ItemStar"]:"") ."" . "|" . "".((isset($_POST["ItemRelocate"]))?$_POST["ItemRelocate"]:"") ."" . "|" . "".((isset($_POST["ItemEnglish"]))?$_POST["ItemEnglish"]:"") ."";
$WA_columnTypesStr = "none,none,NULL|none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL|',none,''|',none,''|none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL|',none,''|none,none,NULL|',none,''|',none,''|',none,''|',none,''";
$WA_comparisonStr = "=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_where_fieldValuesStr = "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$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_latinsite;
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);
}
}
?>