check($_POST['code']);
function h($s) {
return htmlspecialchars($s, ENT_QUOTES, "UTF-8");
}
if($valid == true) {
if( isset($_POST['company']) ){
$info_company = h(trim($_POST['company']));
}
if( isset($_POST['name']) ){
$info_name = h(trim($_POST['name']));
}
if( isset($_POST['tel']) ){
$info_tel = h(trim($_POST['tel']));
}
if( isset($_POST['EMAIL']) ){
$info_email = h(trim($_POST['EMAIL']));
}
if( isset($_POST['coment']) ){
$info_coment = h(trim($_POST['coment']));
}
$contact_datetime = date("Y").date("m").date("d").date("H").date("i").date("s"); //date time
// $sqlStr = "insert into contactjp (date_time, info_company, info_name, info_email, info_tel, info_coment, ipaddress) values ('". $contact_datetime ."', '".$info_company."','" . $info_name . "', '". $info_email ."', '". $info_tel ."', '". $info_coment ."', '". $_SERVER["REMOTE_ADDR"] ."')";
// $result = mysql_query($sqlStr);
// $to = "mfyin@hotmail.com,toshiya@tsugami-workshop.jp,yuriko@tsugami-workshop.jp";
$to = "spicytail@aol.com";
$sbj = "ニセお問い合わせ";
$from_add = 1;
$remail = 0;
$esse = 1;
$body="「".$sbj."」からの発信です。\n\n";
$body.="-------------------------------------------------\n\n";
$body.=" ・ 会社名: ".$info_company."\n\n";
$body.=" ・ 名前: ".$info_name."\n\n";
$body.=" ・ 電話番号: ".$info_tel."\n\n";
$body.=" ・ Email: ".$info_email."\n\n";
$body.=" ・ お問合せ内容: ".$info_coment."\n\n";
$body.=" ・ IP: ".$_SERVER["REMOTE_ADDR"]."\n\n";
$body.="\n-------------------------------------------------\n\n";
$body.="送信時間 : ".date( "Y/m/d (D) H:i:s", time() )."\n";
$from = "info@tsugami-workshop.jp";
//$body=mb_convert_encoding($body,"JIS","SHIFT_JIS");
$sbj="=?UTF-8?B?".base64_encode($sbj)."?=";
$header="From: $from\nReply-To: ".$to."\nContent-Type: text/plain;charset=UTF-8\nX-Mailer: PHP/".phpversion();
mail($to,$sbj,$body,$header);
?>
お問合せありがとうございました。
認証文字が正しくありません