0

お問い合わせフォームを作成する方法を理解しようとしていますが、エラーがどこにあるのかわかりません。これは私の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);
?>

どこが間違っていますか?ありがとう!

4

1 に答える 1