View Single Post
  #2 (permalink)  
Old 11-08-03, 11:45 PM
Aaronn's Avatar
Aaronn Aaronn is offline
Newbie Coder
 
Join Date: Nov 2003
Location: Spokane Washington
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Nevermind, I was able to figure it out. I wrote this code to make it happen:

$sql = "SELECT email FROM agent WHERE access_code = $access_code";
$result = @mysql_query($sql, $connection) or die("Couldn't execute query.");
$row = mysql_result($result, $m, 'email');
$agent_mail = "$first_name $last_name has just viewed your presentation, they can be reached at $phone or you can email them at $email, they want info on $product";
$header = "From: email@email.com";
$subject = "Someone Viewed your presentation";
mail("$row","$subject","$agent_mail","$header");

probably not the prettiest code but it works, and I'm still learning.

-AaronN
Reply With Quote