I'm new to php and want to add a contact form to my website. i found this code but it doesnt seem to submit the form correctly. it comes up with this error 'HTTP ERROR 500' and i'm nt sure how to fix it.
This form is a simple one that i'm using on my portfolio website to allow users to write a message to me as well as leaving their email address and name.
my website is on godaddy on the linux cpanel server.
<?php
$name = $_POST['name'];
$visitor_email = $_POST['email'];
$message = $_POST['message'];
$email_from = 'relay-hosting.secureserver.net';
$email_subject = "New form submission";
$email_body = "User name: $name.
".
"User email: $visitor_email.
".
"User message: $message.
";
$to = "rosie.morrisgrove8@gmail.com";
$headers = "from: $email_from
";
$headers = "Reply-to: $visitor_email
";
mail($to,$email_subject,$email_body,$headers)
header("location: index.html");
?>
Thank you in advance
You are missing a ;
at the end of your second last line.