The problem is the submit button, it's just unclickable, and nothing really happens (=screen doesn't change) when I am trying to submit an email to myself by using the form.
This is my code:
<div class="col-sm-6">
<h4 class="font-alt">Get in touch</h4>
<br>
<form id="contact-form" role="form" novalidate="">
<div class="form-group">
<label class="sr-only" for="cname">Name</label>
<input type="text" id="cname" class="form-control" name="cname" placeholder="Name*" required="" data-validation-required-message="Please enter your name.">
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<label class="sr-only" for="cemail">Your Email</label>
<input type="email" id="cemail" name="cemail" class="form-control" placeholder="Your E-mail*" required="" data-validation-required-message="Please enter your email address.">
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<textarea class="form-control" id="cmessage" name="cmessage" rows="7" placeholder="Message*" required="" data-validation-required-message="Please enter your message."></textarea>
<p class="help-block text-danger"></p>
</div>
<div class="text-center">
<button type="submit" class="btn btn-block btn-round btn-d">Submit</button>
</div>
</form>
<div id="contact-response" class="ajax-response font-alt"></div>
</div>
And this is the PHP I'm working with:
<?php
// Mail settings
$to = "info@liannesiemensma.com";
$subject = "Contact form";
if (isset($_POST["name"]) && isset($_POST["email"]) && isset($_POST["message"])) {
$content = "Name: " . $_POST["name"] . "\r\n";
$content .= "Email: " . $_POST["email"] . "\r\n";
$content .= "Message: " . "\r\n" . $_POST["message"];
if (mail($to, $subject, $content, $_POST["email"])) {
$result = array(
"message" => "Thanks for contacting me! I will do my best to reply in a timely manner.",
"sendstatus" => 1
);
echo json_encode($result);
} else {
$result = array(
"message" => "Sorry, something is wrong.",
"sendstatus" => 0
);
echo json_encode($result);
}
}
?>
What am I doing wrong?