require_once("conn.php"); require_once("includes.php"); //get the agent info //$q1 = "select * from yellow_agents,yellow_posts where PostID = '$_GET[AgentID]' and yellow_posts.AgentID=yellow_agents.AgentID "; $q1 = "select * from yellow_agents where AgentID = '$_GET[AgentID]'"; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); if(isset($_POST[s1])) { $to = $a1[email]; $subject = $_POST[subject]; $message = $_POST[message]; $message .= "\n\nOffer:\nhttp://$_SERVER[HTTP_HOST]/info.php?id=$_GET[AgentID]\n\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_POST[u_name] <$aset[ContactEmail]>\n"; $headers .= "Reply-To: $_POST[u_name] <$_POST[u_email]>\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-MSMail-Priority: Normal\n"; $headers .= "X-Mailer: PHP/" . phpversion(); mail($to, $subject, $message, $headers); $thankyou = "