close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Linking recordset email addresses

Thread began 1/28/2010 9:32 am by ddidion3394878 | Last modified 1/29/2010 5:56 pm by Eric Mittman | 1475 views | 4 replies |


Linking recordset email addresses


I would like to use the contact form dynamicaly. I need the contact form to be linked from a detail page that contains a members email address from a recordset, pass that email address to the contact form so that the mail is sent to that specific member.
Any ideas.This is the codethat is not working.


$WAGLOBAL_Captcha_Width = "200" ;
$WAGLOBAL_Captcha_Height = "40" ;
$WAGLOBAL_Captcha_Characters = "5" ;
$WAGLOBAL_Captcha_Font = "Fonts/MOM_T___.TTF" ;
$WAGLOBAL_Captcha_BG = "ffffff" ;
$WAGLOBAL_Captcha_Noise = "000000" ;
$WAGLOBAL_Captcha_Text = "000000" ;
$WAGLOBAL_Captcha_BG_transparent = "0" ;
$WAGLOBAL_Email_Server = "" ;
$WAGLOBAL_Contact_Email_Subject = "Potential Buyer from American Gym Trader" ;
$WAGLOBAL_Contact_Email_To = ((isset($_POST["ContactEmail"]))?$_POST["ContactEmail"]:"");

$WAGLOBAL_Contact_Email_CC = "";
$WAGLOBAL_Contact_Email_BCC = "";

WAUE contact __________________________________________________________________________________

$MailAttachments = "";
$MailCC = "";
$MailTo = ((isset($_POST["ContactEmail"]))?$_POST["ContactEmail"]:"");

$MailBodyFormat = ""; $MailBody = "";
$MailImportance = "";
$MailFrom = "".((isset($_POST["Email_address"]))?$_POST["Email_address"]:"") ."";
$MailSubject = "".($WAGLOBAL_Contact_Email_Subject) ."";

//Global Variables

$WA_MailObject = WAUE_Definition("".($WAGLOBAL_Email_Server) ."","25","","","","");

if ($RecipientEmail) {
$WA_MailObject = WAUE_AddRecipient($WA_MailObject,$RecipientEmail);
else {
//To Entries

//Attachment Entries

//BCC Entries
$WA_MailObject = WAUE_AddBCC($WA_MailObject,"".($WAGLOBAL_Contact_Email_BCC) ."");

//CC Entries
$WA_MailObject = WAUE_AddCC($WA_MailObject,"".($WAGLOBAL_Contact_Email_CC) ."");

//Body Format
$WA_MailObject = WAUE_BodyFormat($WA_MailObject,2);

//Set Importance
$WA_MailObject = WAUE_SetImportance($WA_MailObject,"3");

//Start Mail Body

$MailBody = $MailBody . "";

require_once(dirname(__FILE__) . ("/Templates/contactus.php"));
$contents = ob_get_clean();

$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . ($contents);
$MailBody = $MailBody . "";
//End Mail Body

$WA_MailObject = WAUE_SendMail($WA_MailObject,$MailAttachments,$MailBCC,$MailCC,$MailTo,$MailImportance,$MailFrom,$MailSubject,$MailBody);

$WA_MailObject = null;

Sign in to reply to this post

Eric Mittman

You can put the Contact form into the details page and make use of the value from the recordset directly. I would suggest that you put this into the details page and make sure that it is working in it's default format first. Once you can confirm that it is working you can make the email form field a hidden field and set the value to your email address from the recordset.

Sign in to reply to this post


Still no luck

Thanks for the reply. I inserted the contact form into the details page and the only way it works is if I type a fixed email address in the mail to line. Is my code correct ?

$WAGLOBAL_Contact_Email_To = ((isset($_POST["ContactEmail"]))?$_POST["ContactEmail"]:"");

Sign in to reply to this post


Up and Running

Thanks Eric

I got the contact form to work . I had the wrong code. Should have been
$RecipientEmail = "".$row_DetailRS1['ContactEmail'] ."";include("WA_Universal_Email/WAUE_contact_1.php");

What makes a great company is not the products they sell, it is the support that stands behind it.I wished I had found WebAssist 6 months ago.

Thanks again

Dave Didion
American Gym Trader

Sign in to reply to this post

Eric Mittman

Nice catch, php is very flexible and easy to work with when it comes to dynamic info. Thanks for the kind words, let us know if you have any other questions or if you encounter any issues.

Sign in to reply to this post

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...