I recently created a site for a friend of mines business, she wanted a contact page that people could send emails from the site. So I created a form and a php file and uploaded everyrthing to the site but it just sends the error message I designated in the php file. Can anyone take a look and see if I have a mistake in the code I am missing? Here is the link to the page and the code. 😕 www.fabrications.us/Contact
Here is the php code
<?php
$name=$_POST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
$to="anEmail@***.***";
$message="$name sent you a comment on your site.\n They said $comment\n\n Their e-mail address was:$email";
if(mail($to,"Comments From Your Site",$message,"From:$email\n")){
echo "Thank you for your inquiry! We will get back to you as soon as possible!";
}else{
echo "There was a problem sending your request. Please go back and check that you filled in the form correctly.";
}
?>
bpat1434: Please don't post email addresses, wouldn't want to make it easier for SPAM....