|
function BeforeAdd(&$values)
{
//Parameters:
//$values - Array object.
//Each field on
the Add form represented as 'Field name'-'Field value' pair
//********** Save
new data in another table ************
global $conn,$strTableName;
$strSQLSave = "INSERT
INTO AnotherTable (Field1, Field2) values (";
$strSQLSave .= $values["Field1"].",";
$strSQLSave .= $values["Field2"];
$strSQLSave .= ")";
db_exec($strSQLSave,$conn);
return true;
//return true if
you like to proceed with adding new record
//return false in
other case
} |