Thanks, Ray. Using the Send Email option, I don't see the ability to choose which fields to include in the email. What am I missing? The insert script runs when the page loads, so I'm not sure what trigger to apply on the email script.
Here is my insert code and email code. It is inserting the transaction into the database, but the email isn't getting sent, and it's not redirecting.
<!-- ********************************************** -->
<!-- Insert Transaction in Transactions Table -->
<!-- ********************************************** -->
<?php
if ("" === "") {
$InsertQuery = new WA_MySQLi_Query($numeroseti);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "transactions";
$InsertQuery->bindColumn("toAcct", "i", "".$toAcct ."", "WA_DEFAULT");
$InsertQuery->bindColumn("fromAcct", "i", "".$fromAcct ."", "WA_DEFAULT");
$InsertQuery->bindColumn("toAcctNewBalance", "i", "".$toAcctNewBalance ."", "WA_DEFAULT");
$InsertQuery->bindColumn("fromAcctNewBalance", "i", "".$fromAcctNewBalance ."", "WA_DEFAULT");
$InsertQuery->bindColumn("amount", "i", "".$_SESSION["getRecipientAmount"] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("description", "s", "".$_SESSION["description"] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("timestamp", "s", "".$time ."", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
if ("" === "") { //WA Universal Email
$Email = new WA_Email("transferaction");
$Email->Redirect = "http://numeroset.websailer.com/index.php";
$Email->From = "admin@websailer.com";
$Email->addTo("".($getRecipient->getColumnVal("user_email")) ."");
$Email->BodyFile = "webassist/email/templates/WebAssist-Block/Block_3.php";
if (function_exists("rel2abs") && $Email->Redirect) $Email->Redirect = $Email->Redirect?rel2abs($Email->Redirect,dirname(__FILE__)):"";
for ($emailGroup=0; $emailGroup<sizeof($Email->To); $emailGroup++) {
$Email->Subject = "Transaction Receipt";
$Email->send($emailGroup);
}
$Email->close();
}
?>
Thanks.