Am trying ti set a form in my contact page,where the user can send their feedback to me through mails. The problem here is am receiving the mail,but the page is not refreshing and no alert box comes...help to solve this My Php code-
<?php
if (isset($_POST['submit']))
{
//print_r($_POST);
$name=$_POST['name'];
$email=$_POST['email'];
$message=$_POST['message'];
$to='xyz@gmail.com';
//$subject='Send mail using php';
//$message='This mail send using php';
$headers="From: $name";
$mail=mail($to,$name,$email,$message);
if($mail)
{
echo'Mail send successfully';
}
else
{
echo'Mail is not send';
}}
?>
and my form is-
<form name="" action="" method="post" class="wpcf7-form">
<div class="row">
<div class="form-group col-xs-12 col-sm-12 col-md-6 col-lg-6">
<label>Your Name</label><br />
<input type="text" name="name" id="name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" placeholder="Your name..." />
</div>
<div class="form-group col-xs-12 col-sm-12 col-md-6 col-lg-6">
<label>Phone</label><br />
<input type="text" id="phone" name="phone" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email form-control" placeholder="Phone number..." />
</div>
</div>
<div class="row">
<div class="form-group col-xs-12 col-sm-12 col-md-6 col-lg-12">
<label>Email Address</label><br />
<input type="text" id="email" name="email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email form-control" placeholder="Email Address..." />
</div>
</div>
<div class="form-group">
<label>Message</label><br />
<textarea name="message" id="message" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required form-control"></textarea>
</div>
<input type="submit" id="submit" name="submit" value="Send Message" class="wpcf7-form-control wpcf7-submit submit_btn" />
</form>