我的网站上有一个用 php 制作的联系表格。问题是它完美地发送英文字母但不支持俄文字母。所以,我需要更改编码,我该怎么做?
这是一个代码:
<div id="center">
<p class="please">Please contact us using this form.</p>
<div id="formbox">
<?
if (isset ($_POST['message'])) {
$name = @ trim ($_POST['name']);
$contact = @ trim ($_POST['contact']);
$message = @ trim ($_POST['message']);
if (! $name or ! $contact or ! $message) echo ('<p style="color: red">You should fill in all the blanks.</p>');
else { mail ("support@myemail.com",
"Message from Giftosite (Sender: $name)",
"$message \n\n Reply to: \n $contact");
echo ('<p style="color: green">Message has been sent, thank you!</p>');
$_POST['name'] = $_POST['contact'] = $_POST['message'] = '';
}
}
?>
<form method="POST" class="form">
<p class="formcontent">Your name:</p>
<input name="name" value="<?=@$_POST['name'];?>">
<p class="formcontent">Your e-mail address:</p>
<input name="contact" value="<?=@$_POST['contact'];?>">
<p class="formcontent">Message:</p>
<textarea name="message" rows="6" cols="36"><?=@$_POST['message'];?></textarea>
<p><input type="submit" value=" Send "></p>
</form>
</div>
</div>