The php code for the insert
<?php
// WA Application Builder Insert
if (isset($_POST["submit1"])) // Trigger
{
$WA_connection = $connauto;
$WA_table = "unclassified";
$WA_sessionName = "unclassified_ad_ID";
$WA_redirectURL = "ucp02.php";
$WA_keepQueryString = true;
$WA_indexField = "ad_ID";
$WA_fieldNamesStr = "client_ID|ad_header|ad_title|ad_price|ad_city_state|ad_description|pic1|pic2|pic3|pic4";
$WA_fieldValuesStr = "".((isset($_POST["hiddenField"]))?$_POST["hiddenField"]:"") ."" . "|" . "".((isset($_POST["Cad03"]))?$_POST["Cad03"]:"") ."" . "|" . "".((isset($_POST["postingtitlediv01"]))?$_POST["postingtitlediv01"]:"") ."" . "|" . "".((isset($_POST["postingtitlediv02"]))?$_POST["postingtitlediv02"]:"") ."" . "|" . "".((isset($_POST["divbox01"]))?$_POST["divbox01"]:"") ."" . "|" . "".((isset($_POST["userdescription"]))?$_POST["userdescription"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["clientFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult2"]["clientFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult3"]["clientFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult4"]["clientFileName"] ."";
$WA_columnTypesStr = "none,none,NULL|',none,''|',none,''|',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_connauto;
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 . ")";
$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);
}
}
?>
this field
"".((isset($_POST["Cad03"]))?$_POST["Cad03"]:"")
contains text and the character '|' (this is used as a divider for appearance)
my thinking is that character is a field seperator when used in the php insert code, so when it sees that character in the "Cad03" field, it reads it as a database field seperator.
I could not use the character in the "Cad03" text field and that would solve the problem, but i was wondering how to get the php code to see that character as text only?