I'm testing my contact form. When I fill in all the fields, he validates it and goes to my "thankyou.html" page. But I don't receive an email..also, in the console in browser he doesn't give the console logs. But he does know the thankyou.html destination. Weird.
I copy paste this form from an other working example, so I don't know if this is really stuck or there is something wrong with sending the email. Live version at: https://www.melkerhei.be/smeltkroes/contact.php
Validating the input does work.
This is my contact-form:
<form method="post" name="contact_form" action="email">
<div class="mt50 row justify-content-center">
<div class="col-lg-6 col-12">
<input type="text" placeholder="name" class="form-control" required>
</div>
<div class="col-lg-6 col-12">
<input type="email" placeholder="email" class="form-control" required>
</div>
<div class="col-12">
<input type="text" placeholder="subject" class="form-control" required>
</div>
<div class="col-12">
<textarea placeholder="Message" name="message" class="form-control" cols="4" rows="4" required></textarea>
</div>
<div class="col-12">
<input name="submit" type="submit" value="submit" class="btn btn-primary form_submit"></input>
</div>
</div>
</form>
This is the email.php file to parse the input:
<?php
console.log("here");
if (isset($_POST["submit"])) {
$name = $_POST["name"];
$email = $_POST["email"];
$subject = $_POST["subject"];
$message = $_POST["message"];
$your_email = "myemailgmail.com";
$contact = "Smeltkroes";
$email_body = "You have received a new message. ". " Here are the details:\n Name: $name \n ". "Email: $email_address\n Message \n $message";
console.log("Message here");
mail ($your_email, $subject, $email_body, "From: $name <$email>");
console.log("Message send");
header ("Location: thankyou.html");
exit();
}