-1

Hi guys please could someone have a look at the following for me, I dont understand why I am getting the error. The HTML looks like this

<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>

Then my form.php, like this. The error is on line 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”;
}
?>

I would really appreciate your help.

4

1 回答 1

3
于 2013-07-01T10:16:10.880 回答