Eric,
I added your code to the server behavior, but it doesn't do anything and sends me to the results page with the record added.
I labeled the code where i added the die($WA_Sql); Note: I did not add the spcing on top and bottom.
P.S. Attached is an image of my dynamic dropdown box. The Value is categoryName and the id is categoryName.
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $products;
$WA_table = "Specials";
$WA_sessionName = "Insert_Specials";
$WA_redirectURL = "Specials_Results.php";
$WA_keepQueryString = false;
$WA_indexField = "id";
$WA_fieldNamesStr = "Title|descript|category|insideDim|outsideDim|photo1|photo2";
$WA_fieldValuesStr = "".((isset($_POST["Title"]))?$_POST["Title"]:"") ."" . "|" . "".((isset($_POST["descript"]))?$_POST["descript"]:"") ."" . "|" . "".((isset($_POST["category"]))?$_POST["category"]:"") ."" . "|" . "".((isset($_POST["insideDim"]))?$_POST["insideDim"]:"") ."" . "|" . "".((isset($_POST["outsideDim"]))?$_POST["outsideDim"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"] ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_products;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
die($WA_Sql); <-- Inserted your code here without top and bottom spaces -->
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
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);
}
}
?>
Thanks