dongpi9494 2014-03-30 12:51
浏览 23
已采纳

php形式的希腊语支持

I'm using this php contact form but it does not support greek!

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My Contact Form</title>
</head>
<body>
<form method="POST" action="mailer.php">
 ONOMA:
 <input type="text" name="name" size="19"><br>
 <br>
 EMail:
 <input type="text" name="email" size="19"><br>
 <br>
 <input type="checkbox" name="check[]" value="blue"> MPLE<br>
 <input type="checkbox" name="check[]" value="green"> PRASSINO<br>
 <input type="checkbox" name="check[]" value="orange"> PORTOKALI <br>
 <br>
 <input type="radio" value="yes" name="radio"> NAI<br>
 <input type="radio" value="no" name="radio"> OXI
 <br>
 <br>
 <select size="1" name="drop_down">
 <option>php</option>
 <option>xml</option>
 <option>asp</option>
 <option>jsp</option>
 </select><br>
 <br>
 MHNYMA:<br>
 <textarea rows="9" name="message" cols="30"></textarea><br>
 <br>
 <input type="submit" value="Submit" name="submit">
</form>
</body>
</html>

mailer.php

<?php
if(isset($_POST['submit'])) {
 $to = "email@email.gr";
 $subject = "Form Contact Form";
 $name_field = $_POST['name'];
 $email_field = $_POST['email'];
 $message = $_POST['message'];
 $option = $_POST['radio'];
 $dropdown = $_POST['drop_down'];
 foreach($_POST['check'] as $value) {
 $check_msg .= "Checked: $value
";
 }
 $body = "From: $name_field
 E-Mail: $email_field
 $check_msg Option: $option
 Drop-Down: $dropdown
 Message:
 $message
";
 echo "Your Mail Was Sent To $to!";
 mail($to, $subject, $body);
} else {
 echo "Error";
}
?>

Any help is appreciated!

  • 写回答

1条回答 默认 最新

  • doutou19761022 2014-03-30 12:54
    关注

    Try charset=UTF-8 in your meta tag. Also make sure that you save the file with UTF-8 (rather than ANSI) encoding in whatever text editor you use. The option should appear when you select "Save As" from the file menu

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题