Hey guys so I have an HTML document with a contact form I created and it is not working. I have the PHP in a seperate PHP file like so:
HTML:
<form class="form-horizontal" action="form_process.php" method="post" name="contact_form">
<div class="form-group">
<label class="col-sm-2 control-label white-color">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" name="email" placeholder="Email" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label white-color">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="name" placeholder="First Name" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label white-color">Message</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" placeholder="Type your message here!" name="message" required></textarea>
<button type="submit" class="btn btn-default btn-lg text-center" id="send-btn" name="submit">Send</button>
</div>
</div>
</form>
And here is the PHP:
<?php
if (isset($POST['name']) && isset($_POST['email'])) {
$email = $_POST['email'];
$name = $_POST['name'];
$message = $_POST['message'];
$to = 'j_goris@live.com';
$subject = 'JorgeGoris.com Form Submission';
$text = "Name: ".$name."
"."Email: ".$email."
". "Wrote the following: "."
".$message;
if(mail($to, $subject, $text, "From: ".$name)){
echo '<h1>Thanks! I will get back to you shortly.</h1>';
}
else {
echo 'Sorry there was an error! Please try again.';
}
}?>
This is my first time tackling PHP contact forms. I uploaded all my files to my server and still no dice. Can you guys see whats wrong?