我试图弄清楚如何建立联系表格,但我不明白错误在哪里。这是我的html表单:
<form id="contact-form" method="post" action="mail.php"> <!-- contact form -->
<h4>Inviaci un Messaggio</h4>
<div class="row-fluid">
<div class="span4">
<input type="text" name="name" maxlength="80" placeholder="Nome (richiesto)" />
</div>
<div class="span4">
<input type="text" name="email" maxlength="255" placeholder="Email (richiesto)" />
</div>
<div class="span4">
<input type="text" name="subject" placeholder="Oggetto" />
</div>
</div>
<textarea name="message" placeholder="Testo (richiesto)"></textarea>
<input type="submit" name="submit" value="Invia" class="btn" />
</form>
这是mail.php
<?php
$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$message = $_POST['message'] ;
mail("my@mail.com", $subject,
$message, "From:" . $email);
?>
我哪里错了?谢谢!