Create FormĀ 

<div class=”col-sm-6 col-md-6 col-lg-6 contact_left”>
<form class=”contact_main-form” action=”sendMail.php” method=”post” id=”my_form”>
<div class=”form-group”>
<label class=”text_name_c_form”>Name:</label>
<input type=”text” class=”form-control input_form_c” id=”Email” name=”name” required>
</div>
<div class=”form-group”>
<label class=”text_name_c_form”>Email:</label>
<input type=”email” class=”form-control input_form_c” id=”Email” name=”email” required>
</div>
<div class=”form-group”>
<label class=”text_name_c_form”>Subject:</label>
<input type=”text” class=”form-control input_form_c” id=”Email” name=”subject” required>
</div>

<div class=”form-group”>
<label class=”text_name_c_form msg_1″>Message:</label>
<textarea class=”form-control input_form_c text-area” rows=”3″ name=”msg” minlength=50 required></textarea>
</div>

<button type=”submit” name=”submit” class=”btn btn-default”>Send</button>

<div class=”g-recaptcha” data-sitekey=”your key“></div>

</form>
<div id=”server-results”><!– For server results –></div>

</div>

sendMail.php

<?php
$email;$message;$captcha; $subject;
$ToEmail = ‘your@testmail.com’;
$EmailSubject = ‘Site contact form’;
$mailheader = “From: “.$_POST[“email”].”\r\n”;
$mailheader .= “Reply-To: “.$_POST[“email”].”\r\n”;
$mailheader .= “Content-type: text/html; charset=iso-8859-1\r\n”;
$name = “Name: “.$_POST[“name”].””;
$email .= “Email: “.$_POST[“email”].””;
$sub .= “Subject: “.nl2br($_POST[“subject”]).””;
$msg .= “Message: “.nl2br($_POST[“msg”]).””;
$content = ‘<div style=”width:90%;margin:0 auto;text-align:left;padding-left:4px”>

<strong>First Name:</strong> ‘.$name.'<br>

<strong>Subject:</strong> ‘.$sub.'<br>

<strong>Email:</strong> ‘.$email.'<br>

<strong>Message:</strong> ‘.$msg.'<br>

.</div>’;
if ($_POST[“email”]<>”) {

if(isset($_POST[’email’])){
$email=$_POST[’email’];

}
if(isset($_POST[‘subject’])){
$subject=$_POST[‘subject’];
}

if(isset($_POST[‘g-recaptcha-response’])){
$captcha=$_POST[‘g-recaptcha-response’];
}
if(!$captcha){
echo ‘<h2>Please check the the captcha form.</h2>’;

}
$secretKey = “Your Google Secret key“;
$ip = $_SERVER[‘REMOTE_ADDR’];
$response=file_get_contents(“https://www.google.com/recaptcha/api/siteverify?secret=”.$secretKey.”&response=”.$captcha.”&remoteip=”.$ip);
$responseKeys = json_decode($response,true); ?>
<?php
if(intval($responseKeys[“success”]) !== 1) { ?>
<?php } else { ?> <?php
mail($ToEmail, $EmailSubject, $content , $mailheader) or die (“Failure”); ?>
<div class=”alert alert-success”> <strong>Thank you for your message!
We will answer you within maximum 48h check</strong>
</div>
<?php
}
}
?>

Ajax

jQuery(“#my_form”).submit(function(event){
event.preventDefault(); //prevent default action
var post_url = $(this).attr(“action”); //get form action url
var request_method = $(this).attr(“method”); //get form GET/POST method
var form_data = new FormData(this); //Creates new FormData object
jQuery.ajax({
url : post_url,
type: request_method,
data : form_data,
contentType: false,
cache: false,
processData:false
}).done(function(response){ //
$(“#server-results”).html(response);
});
});

<script src="http://maps.google.com/maps/api/js?key=YourKey&callbacksensor=false"></script>
 
Call Where you want to show Map 
<div id="map" style="width: 500px; height: 400px;"></div>

<script>
var locations = [
[
“Your adress1”,
28.541868,
77.1161973,
1,

],
[
“Your adress2”,
28.634747,
77.2187213,
2,

],
[
“Your adress3”,
28.567317,
77.2390653,
3,

],

]

var map = new google.maps.Map(document.getElementById(‘map’), {
zoom: 8,
// center: new google.maps.LatLng(-33.92, 151.25),
center: new google.maps.LatLng(28.541868, 77.1161973),
mapTypeId: google.maps.MapTypeId.ROADMAP
});

var infowindow = new google.maps.InfoWindow();

var marker, i;

for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});

google.maps.event.addListener(marker, ‘click’, (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0], locations[i][6]);
infowindow.open(map, marker);
}
})(marker, i));
}
</script>