"; echo "body {"; echo "color: #".$thm['t_color'].";"; echo "background: #".$thm['bg_color']." ".$thm_bg.");"; echo "}"; echo "a {"; echo "color: #".$thm['l_color'].";"; echo "}"; echo ".h_1{"; echo "font-size: 12px"; echo "color: #".$thm['h1_color'].""; echo "}"; echo "#header { "; echo "background: #".$thm['h_color'].";"; echo "}"; echo "#left,#left p{"; echo "color: #".$thm['t_color'].";"; echo "}"; echo ""; ?>
Front Page Banner

ติดต่อ / สอบถาม / ขอรายละเอียดสินค้า กรุณากรอกแบบฟอร์มด้านล่างค่ะ
For emergency call : Tel. +66 (0)2 979 2982-3 | Fax. +66 (0)2 979 2984

"; $message.="Company : ".$_POST['company']; $message.="
"; $message.="Contact number : ".$_POST['tel']; $message.="
"; $message.="Subject :".$_POST['subject'].""; $message.="
"; $message.="Message :".$_POST['message']; //define the receiver of the email $strTo = "3builders@polysource.co.th"; //define the subject of the email $Subject = $_POST['subject']; $strSubject ='=?UTF-8?B?'.base64_encode($Subject).'?='; //create a boundary string. It must be unique //so we use the MD5 algorithm to generate a random hash $strHeader = "Content-type: text/html; charset=utf-8\r\n"; // or UTF-8 // $strHeader.= "MIME-Version: 1.0\r\n"; //$strHeader .= "From: ".$_POST['name']."\r\n"; //$strHeader .= "Reply-To: ".$_POST['email']."\r\n"; $strHeader.= "From: ".$_POST['name']."<".$_POST['email'].">\r\nReply-To: ".$_POST['email']; //define the body of the message. //$strheader .= "X-Mailer: PHP/Techstore"; $strMessage = $message; //send the email $flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error // //if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" if(!$flgSend) { echo "Mailer Error: "; } else { $date=date('Y-m-d'); $sql="insert into enquiry values ('','".$_POST['name']."','".$_POST['company']."','".$_POST['email']."','".$_POST['tel']."','".$_POST['subject']."','".$_POST['message']."','".$date."')"; $rs=mysql_query($sql); if($rs!=false){ ?>
Sending failed ".mysql_error(); } } }else{ //form if($_GET['name']){ $sub="Enquiry for ".$_GET['name']; }elseif($_GET['app']){ $sub="Application information of ".$_GET['app']; }else{ $sub=""; } ?>
Name : *
Company : *
E-mail : *
Tel :
Subject : *
Detail : *
Security Code:
*