Contact Us form not Functioning HTML5/PHP Help needed
<p>Good day,</p>

<p>Newbie here in PHP. I have been working on a website (free template) and got all the functions to work except the Contact Us part of the code. I don't get any errors it just does not send any email to the listed email or send back a response to the sender.</p>

<p><strong>Here is the HTML Side of the code:</strong></p>

<pre><code>&lt;form id="contact-form" action="php/mail.php"&gt;
&lt;div class="control-group"&gt;
&lt;div class="controls"&gt;
&lt;input class="span6" type="text" id="name" name="name" placeholder="* Your name..."/&gt;
&lt;div class="error center" id="err-name"&gt;Please enter your name.&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class="control-group"&gt;
&lt;div class="controls"&gt;
&lt;input class="span6" type="email" name="email" id="email" placeholder="* Your email..."/&gt;
&lt;div class="error center" id="err-email"&gt;Please enter a valid email adress.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="control-group"&gt;
&lt;div class="controls"&gt;
&lt;textarea class="span6" name="comment" id="comment" placeholder="* Comments..."&gt;&lt;/textarea&gt;
&lt;div class="error center" id="err-comment"&gt;Please enter your comment.&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class="control-group"&gt;
&lt;div class="controls"&gt;
&lt;button id="send-mail" class="message-btn"&gt;Send message&lt;/button&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/form&gt;
</code></pre>

<p><strong>and this is the mail.php code used:</strong></p>

<pre><code>include 'functions.php';

if (!empty($_POST)) {

$data['success'] = true;
$_POST = multiDimensionalArrayMap('cleanEvilTags', $_POST);
$_POST = multiDimensionalArrayMap('cleanData', $_POST);

//your email adress
$emailTo = "myemail@gmail.com"; //"myemail@gmail.com";

//from email adress
$emailFrom = "myemail@gmail.com"; //"myemail@gmail.com";

//email subject
$emailSubject = "Mail from MyEmail";

$name = $_POST["name"];
$email = $_POST["email"];
$comment = $_POST["comment"];
if ($name == "")
$data['success'] = false;

if (!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email))
$data['success'] = false;

if ($comment == "")
$data['success'] = false;

if ($data['success'] == true) {

$message = "NAME: $name&lt;br&gt;
EMAIL: $email&lt;br&gt;
COMMENT: $comment";

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html; charset=utf-8" . "\r\n";
$headers .= "From: &lt;$emailFrom&gt;" . "\r\n";
mail($emailTo, $emailSubject, $message, $headers);

$data['success'] = true;
echo json_encode($data);
}
}
</code></pre>

<p>I am really stuck at this point and this is the only issue I have left hope someone can help point out what I am doing wrong.</p>

<p>Regards,</p>

<p>Rafael</p>