close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Adding binding data to email body

Thread began 7/16/2010 3:03 pm by Badger | Last modified 7/21/2010 4:10 pm by Badger | 997 views | 7 replies


Sorry Eric, spoke too soon.

The information I want in the email is appearing correctly in the page with UE. Just wont go onto the form.

It seems that it's using data from another session. IE it isn't grabbing the correct field info when I tried adding a simple additional recordset using the items table. I think it could be the order of the code of the data needs binding to another table? I've tried adding different variables but then it sees nothing. Maybe I need to hand code the original complicated recordset that gets to this point (loads of joins, sql etc)?

Currently the waue_Items_Detail_1.php file has the dynamic data as follows:

//Start Mail Body
$MailBody = $MailBody . "<html><head></head><body>\r\n";
$MailBody = $MailBody . "<h1>Website quotation enquiry</h1>\r\n";
$MailBody = $MailBody . "<p>An enquiry has been made about the  following item:</p>\r\n";
$MailBody = $MailBody . "<p>Item name: ";
$MailBody = $MailBody .  $row_WADAItems['ItemName'];
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>Code: ";
$MailBody = $MailBody .  $row_WADAItems['ItemSKU'];
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>The enquiry is from: ";
$MailBody = $MailBody .  ((isset($_POST["Quotation_request_group_Name"]))?$_POST["Quotation_request_group_Name"]:"");
$MailBody = $MailBody . "<br />\r\n";

and the recordset on the details page looks like this:

if (isset(
$_GET['ItemID'])) {
$ParamItemID_WADAItems = (get_magic_quotes_gpc()) ? $_GET['ItemID'] : addslashes($_GET['ItemID']);
$ParamSessionItemID_WADAItems "-1";
if (isset(
$_SESSION['WADA_Insert_Items'])) {
$ParamSessionItemID_WADAItems = (get_magic_quotes_gpc()) ? $_SESSION['WADA_Insert_Items'] : addslashes($_SESSION['WADA_Insert_Items']);
$ParamItemID2_WADAItems "-1";
if (isset(
$_GET['ItemID'])) {
$ParamItemID2_WADAItems = (get_magic_quotes_gpc()) ? $_GET['ItemID'] : addslashes($_GET['ItemID']);
$query_WADAItems sprintf("SELECT Items.*, ItemMake.*, ItemStyle.*, ItemType.* FROM Items INNER JOIN ItemMake ON Items.MakeID = ItemMake.ItemMakeID INNER JOIN ItemStyle ON Items.StyleID = ItemStyle.ItemStyleID INNER JOIN ItemType ON Items.TypeID = ItemType.ItemTypeID WHERE ItemID = %s OR ( -1= %s AND ItemID= %s)"GetSQLValueString($ParamItemID_WADAItems"int"),GetSQLValueString($ParamItemID2_WADAItems"int"),GetSQLValueString($ParamSessionItemID_WADAItems"int"));
$WADAItems mysql_query($query_WADAItems$connChan) or die(mysql_error());
$row_WADAItems mysql_fetch_assoc($WADAItems);
$totalRows_WADAItems mysql_num_rows($WADAItems);

$query_rsDescription "SELECT * FROM descriptions WHERE descID = 10";
$rsDescription mysql_query($query_rsDescription$connChan) or die(mysql_error());
$row_rsDescription mysql_fetch_assoc($rsDescription);
$totalRows_rsDescription mysql_num_rows($rsDescription);

$query_rsHard "SELECT * FROM Items";
$rsHard mysql_query($query_rsHard$connChan) or die(mysql_error());
$row_rsHard mysql_fetch_assoc($rsHard);
$totalRows_rsHard mysql_num_rows($rsHard);?>
require_once("webassist/email/mail_php.php"); ?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...