J
|
Jane 6/11/2009 |
Hi, if ($values["MailBrochure"]==-1) { //** Send email with old data record **** global $conn,$strTableName; $email="support@agridryllc.com"; $from="support@agridryllc.com"; $msg=""; $subject="Mail Brochure to Contact"; // modify the following SQL query to select fields you like to send $rs = db_query("select Field1,Field2,Field3 from " . $strTableName ." where ". $where,$conn); if($data=db_fetch_array($rs)) { foreach($data as $field=>$value) $msg.= $field." : ".$value."\r\n"; $ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from)); if(!$ret["mailed"]) echo $ret["message"]; } } |