我的联系页面有一些问题。以下是部分:
<form method="post" action="mail.php">
<input name="nome" type="text" style="width: 265px;" placeholder="Nome e Cognome">
<input name="mail" type="email" style="width: 263px;" placeholder="E-mail">
<textarea name="messaggio" placeholder="Messaggio"></textarea>
<button type="submit" name="invia" style="margin-left: 0; margin-top: 10px;">Invia</button>
</form>
和..
<?php
$to = "mail";
$subject = "Modulo proveniente dal sito www.miosito.it";
$body = "Contenuto del modulo:\n\n";
$body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "\n";
$body .= "Email: " . trim(stripslashes($_POST["mail"])) . "\n";
$body .= "Messaggio: " . trim(stripslashes($_POST["messaggio"])) . "\n";
$headers = "From: Valle srl <info@vallesrl.com>";
"Content-Type: text/html; charset=iso-8859-1\n";
if(@mail($to, $subject, $body, $headers)) {
header("Location: http://www.alessandrogiordano.me/test/valle02/sent.php");
} else {
header("Location: http://www.alessandrogiordano.me/test/valle02/nosent.php");
}
?>
首先..如果我点击提交按钮,所有空白的电子邮件都发送空白。即使我犯了一些错误并且我收到了电子邮件发送的 else 消息.. 显然是空白的。我快疯了。我正在为朋友免费制作这个网站,但我是平面设计师而不是网络开发人员。再也不!:D
帮助!!非常感谢。