Добры день. Приобрел шаблон от tembplate bundle ,с ним все норм ,вот только формы связи не работают. После клика на ''отправку'' ничего не произойдет кроме изменении цвет самой кнопки. На файле ajamail.php поставил почты правильно как написана на документации шаблона. Вот php и html
<!--contact form section start-->
<div class="wrapper_main contact_form_section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="contact_form_heading">
<h5>Быстрый</h5>
<h3>Заказ</h3> </div>
</div>
<div class="lw_contact_form">
<form method="post">
<div class="col-lg-6 col-md-6 col-sm-6">
<input type="text" name="name" placeholder="Имя*" class="contact_input" id="uname"/> </div>
<div class="col-lg-6 col-md-6 col-sm-6">
<input type="email" name="email" placeholder="Email*" class="contact_input" id="uemail"/> </div>
<div class="col-lg-6 col-md-6 col-sm-6">
<input type="text" name="phone" placeholder="Телефон*" class="contact_input" id="uphone"/> </div>
<div class="col-lg-6 col-md-6 col-sm-6">
<select name="services" class="form_select" id="serv_ices">
<option>Сервис*</option>
<option value="Financial Planning">Сервис1</option>
<option value="Audit & Assurance">Сервис2</option>
<option value="Online Consulting">Сервис3</option>
</select>
</div>
<div class="col-lg-12 col-md-12 col-sm-12">
<textarea name="textarea" class="contact_textarea" placeholder="comment*" id="mesg"> </textarea>
</div>
<div class="submit-btn-frm col-lg-12">
<!-- <input type="submit" value="submit now" id="em_sub"> -->
<button type="button" value="submit now" id="em_sub"> Отправить Заявку </button>
</div>
<p id="err"></p>
</form>
</div>
</div>
</div>
</div>
<!--contact form end-->
<?php
$un=$_POST['username'];
$em=$_POST['useremail'];
$ph=$_POST['userphone'];
$servic=$_POST['services'];
$meesg=$_POST['mesg'];
if(trim($un)!="Your Name" && trim($em)!="Your Email" && trim($servic)!="Your services" && trim($meesg)!="Your message" && trim($un)!="" && trim($em)!="" && trim($ph)!="" && trim($servic)!="" && trim($meesg)!="")
{
if(filter_var($em, FILTER_VALIDATE_EMAIL))
{
$message="Hi Admin..<p>".$un." has sent a query having email id as ".$em." </p><p>Message is : ".$meesg."</p>";
$message_user="Hi ".$un."<p> Thank you so much for your valuable comments. <br> Our Support team will get back to you ASAP.</p><p>Have a great day ahead.</p>";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <моймеил>' . "\r\n";
if(mail('моймеил@gmail.com','Query for Lawyer',$message,$headers ))
{
mail($em,'Reply from Lawyer Template Team',$message_user,$headers );
echo '1#<p style="color:green;">Mail has been sent successfully.</p>';
}
else
{
echo '2#<p style="color:red;">Please, Try Again.</p>';
}
}
else
echo '2#<p style="color:red">Please, provide valid Email.</p>';
}
else
{
echo '2#<p style="color:red">Please, fill all the details.</p>';
}
?>