I have created a contact form for a website but it doesn't seem to email when I submit a form.
here is the form code
<form action="email_contact.php" method="post">
<input type="text" name="name" value="" placeholder="Your Name"/><br>
<input type="text" name="email" value="" placeholder="Your Email"/> <br>
<textarea name="projectDetails" placeholder="Your Project Details."></textarea>
<br>
<button> Submit! </button>
</form>
and here is the php code that it links to when submitted
<?php
$to="backstback@hotmail.com";
$subject = "Competition Information";
$message = "Netball: " . $_POST['name'] . "\r\n" .
"Email: " . $_POST['email'] . "\r\n" .
"Info " . $_POST['projectDetails'] ."\r\n" .
$from = $_POST['email'];
$headers = "From: $from" . "\r\n";
mail($to,$subject,$message,$headers);
?>
I'm Completely stumped on this. Any help is appreciated.