Hi Eric
Thanks for the explination - I understand the principal, but can not get it to work.
I have put the echo statement within a hidden form field and have created an update behaviour using DA which updates this hidden field however nothing is getting updated.
the server behaviour is;
<?php
// WA Application Builder Update
if (isset($_POST["LogIn_x"])) // Trigger
{
$WA_connection = $lsdogs;
$WA_table = "users";
$WA_redirectURL = "index.php";
$WA_keepQueryString = false;
$WA_indexField = "id";
$WA_fieldNamesStr = "logged_in";
$WA_fieldValuesStr = "".((isset($_POST["time"]))?$_POST["time"]:"") ."";
$WA_columnTypesStr = "none,none,NULL";
$WA_comparisonStr = "=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_where_fieldValuesStr = "".$_SESSION['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_lsdogs;
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 wonder if it is the key column on the first page of the wizzard that is the problem?
I have removed the success redirect from the authentication behaviour and have inserted it into the update so that the user does not get redirected before the script has run.