I'm trying to make a simple contact page, but everytime I try to send a message, I get an error.
Here is the PHP code:
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "mailto:benten@benniestudios.eu";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $email, $formcontent, $mailheader) or die("Error!");
echo '<script language="javascript">';
echo 'alert("message successfully sent")';
echo '</script>';
echo '<a href="http://www.benniestudios.eu">Return Home</a>';
?>
What did I do wrong? If you need more info, please tell me.