If you have a long form that you use to update data in your database on a regular basis by someone other than a "Site Administrator" then you would probably want to send an email to the "Site Administrator" notifying them about the updated data.
Question: How does the Site Administrator find the updated information in the email?
Answer: Only sent the updated information.
Follow the following steps to set this up.
global $add_status; if ($tNG->getColumnValue('ad_status') != $tNG->getSavedValue('ad_status')) { $add_status = 'Status Changed to: '.$tNG->getColumnValue('ad_status').'<br />'; } global $bal_due; if ($tNG->getColumnValue('ad_total_amount') != $tNG->getSavedValue('ad_total_amount')) { $bal_due = 'Balance Due: '.$tNG->getColumnValue('ad_total_amount').'<br />'; }
{POST.ad_status} != {rs_old_data.ad_status} || {POST.ad_total_amount} != {rs_old_data.ad_total_amount}
Compose the email that needs to be sent and make sure the email format has been set to HTML
Your email might look something like this:
The following changes have been made.<br /> {GLOBALS.add_status} {GLOBALS.bal_due} End of updates
By adding html in the global variable in step 4 you avoid the need for html in your email and ending up with blank spaces