こんにちは、誰か私のために以下を見てください。なぜエラーが発生するのかわかりません。HTMLはこんな感じ
<form action="form.php" method="post"> <label for="name">Name:</label> <input type="text" name="name" id="name" required placeholder="Name" /> <label for="email">Email:</label> <input type="email" name="email" id="email" required placeholder="email@example.com" /> <label for="website">Website:</label> <input type="url" name="website" id="website" required placeholder="http://www.example.com" /> <label for="message">Message:</label> <textarea name="message" id="message" required></textarea> <input type="submit" value="Send Message" /> </form>
それから私のform.php、このように。エラーは16行目にあります
<?php
$name=$HTTP_POST_VARS['name'];
$email=$HTTP_POST_VARS['email'];
$subject=$HTTP_POST_VARS['subject'];
$message=$HTTP_POST_VARS['message'];
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=utf-8\r\n";
$headers .= "From: $name \r\nReply-to : $name \nX-Mailer:PHP”;
$subject=”$subject”;
$destinataire=”sean@seankonig.co.za”;
$body=”$message”;
**if (mail($destinataire,$subject,$body,$headers)) {**
echo “It works”;
} else {
echo “Problem”;
}
?>
よろしくお願いします。