That did not work... I think the problem is just getting the $match array to pass to the DA Insert code.
$match is created within the form
the button is labeled id/name "InsertMe"
and the primary trigger looks for this as referenced by:
<?php
// WA Application Builder Insert
if (isset($_POST["InsertMe"])) // Trigger
{
But nothing gets inserted nor does any value get shown in the js alert I am using to see if the array is present:
<?php
// WA Application Builder Insert
if (isset($_POST["InsertMe"])) // Trigger
{
echo "<script language=\"JavaScript\">\n";
echo "alert('";
echo '<pre>';
print_r($matches[0]);
echo '</pre>';
echo "we made it this far');\n";
echo "</script>";
// loop to allow array of inserts
for($i = 0; $i < sizeof($matches); $i++) {
{
$WA_connection = $emailList;
$WA_table = "phplist_user_user";
$WA_sessionName = "phplist_user_user_id";
$WA_redirectURL = "";
$WA_keepQueryString = false;
$WA_indexField = "id";
$WA_fieldNamesStr = "email|confirmed|uniqid|htmlemail|subscribepage";
$WA_fieldValuesStr = "$matches[$i]" . "|" . "1" . "|" . md5(uniqid(mt_rand())) . "|" . "1" . "|" . "4";
$WA_columnTypesStr = "',none,''|none,none,NULL|',none,''|none,none,NULL|none,none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_emailList;
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);
}
}
}
}
?>