希伯来语在联系表格上

时间:2018-06-12 06:22:15

标签: forms contact hebrew

我需要帮助将php输出转换为NON Giberrish。 前端的字符集是utf-8。

这是php代码的联系表格:

 <?php

$field_first_name = $_POST['names'];

$field_email = $_POST['email'];

$field_phone = $_POST['phone'];

$field_message = $_POST['message'];

$mail_to = 'guyz@guy-z.info';

$subject = 'הודעה מהאתר:  '.$field_first_name;

$body_message = 'מאת: '.$field_first_name."\n";

$body_message .= 'דואר אלקטרוני: '.$field_email."\n";

$body_message .= 'טלפון: '.$field_phone."\n";

$body_message .= ' תוכן ההודעה: '.$field_message;

$headers = 'מאת: '.$field_email."\r\n";

$headers .= 'השב ל: '.$field_email."\r\n";

$mail_status = mail($mail_to, $subject, $body_message, $headers);


if ($mail_status) { ?>
    <script language="javascript" type="text/javascript">
        //alert('Thank you for the message. We will contact you shortly.');
        window.location = 'index.php';
    </script>
<?php
}
else { ?>
    <script language="javascript" type="text/javascript">
        //alert('Message failed. Please, send an email to gordon@template-help.com');
        window.location = 'index.php';
    </script>
<?php
}
?>

这是当前的输出:

Output image

谢谢!

0 个答案:

没有答案