I'm trying to do a simple contact form and have it send to an e-mail but its giving me an error after clicking submit. Here's my code:
<form action="contact.php" method="post">
<fieldset>
<legend>Contact Information</legend>
First Name: <input type="text" name="fname" id="fname" value="" /><br />
Last Name: <input type="text" name="lname" id="lname" value="" /><br />
Phone Number: <input type="text" name="number" id="number" value="" /><br />
E-Mail Address: <input type="text" name="email" id="email" value="" /><br />
Confirm E-Mail Address: <input type="text" name="confemail" id="confemail" value="" /><br />
</fieldset><br />
<fieldset>
<legend>Extra Info</legend>
<label for="youneed">Tell Us What You Need:</label><br />
<textarea name="youneed" value="youneed"></textarea>
</fieldset><br />
<fieldset>
<legend>Submit And We'll Get Back To You</legend>
<input type="submit" id="submit" value="Submit" />
</fieldset>
</form>
<?php
if (isset($_POST["email"])) ;
{
$myemail ="contact@daintydeliites.com" ;
$subject ="Contact Form From DD Site" ;
$mailheader ="From:" . $_POST["email"] . "\r \n" ;
$mailheader ="Reply-To:" . $_POST["email"] . "\r \n" ;
$mailheader ="Content-type: text/html" ;
$MESSAGE_BODY ="First Name:" . $_POST["fname"] . " " ;
$MESSAGE_BODY ="Last Name:" . $_POST["lname"] . " " ;
$MESSAGE_BODY ="Phone Number:" . $_POST["number"] . " " ;
$MESSAGE_BODY ="E-Mail Address:" . $_POST["email"] . " " ;
$MESSGAE_BODY ="I Need:" . $_POST["youneed"] . " " ;
mail ($myemail, $subject, $MESSAGE_BODY, $mailheader);
}
else
{
die("Your email failed to send, please check your email address.");
}
?>