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:
<?php
$ParamItemID_WADAItems = "-1";
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']);
}
mysql_select_db($database_connChan, $connChan);
$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);
mysql_select_db($database_connChan, $connChan);
$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);
mysql_select_db($database_connChan, $connChan);
$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);?>
<?php require_once("webassist/email/mail_php.php"); ?>