This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Wednesday, 30 October 2013

Make Address Marker on Google Map Using PHP

This tutorial is intended for developers who are familiar with PHP/javascript, and want to learn how to use Google Maps with a location Address. After completing this tutorial, you will have a Google Map based off a places. The map will differentiate between two types of places—restaurants and bars—by giving their markers distinguishing icons. An info window with name and address information will display above a marker when clicked.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Map Test</title>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
   <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAjU0EJWnWPMv7oQ-jjS7dYxQ82LsCgTSsdpNEnBsExtoeJv4cdBSUkiLH6ntmAr_5O4EfjDwOa0oZBQ" type="text/javascript"></script>
  </head>
  <body onunload="GUnload()">
  <div id="map_canvas" style="width: 500px; height: 300px"></div>


<script type="text/javascript">
if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map_canvas"));
map.setUIToDefault();

var baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);

function createMarker(point, index) {
 // Create a lettered icon for this point using our icon class
 var letter = String.fromCharCode("A".charCodeAt(0) + index);
 var letteredIcon = new GIcon(baseIcon);
 letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";

 // Set up our GMarkerOptions object
 markerOptions = { icon:letteredIcon };
 var marker = new GMarker(point, markerOptions);

 GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(addresses[index]);
 });
 return marker;
}

  var geo = new GClientGeocoder();

  // ====== Array for decoding the failure codes ======
  var reasons=[];
  reasons[G_GEO_SUCCESS]            = "Success";
  reasons[G_GEO_MISSING_ADDRESS]    = "Missing Address: The address was either missing or had no value.";
  reasons[G_GEO_UNKNOWN_ADDRESS]    = "Unknown Address:  No corresponding geographic location could be found for the specified address.";
  reasons[G_GEO_UNAVAILABLE_ADDRESS]= "Unavailable Address:  The geocode for the given address cannot be returned due to legal or contractual reasons.";
  reasons[G_GEO_BAD_KEY]            = "Bad Key: The API key is either invalid or does not match the domain for which it was given";
  reasons[G_GEO_TOO_MANY_QUERIES]   = "Too Many Queries: The daily geocoding quota for this site has been exceeded.";
  reasons[G_GEO_SERVER_ERROR]       = "Server error: The geocoding request could not be successfully processed.";
  reasons[403]                      = "Error 403: Probably an incorrect error caused by a bug in the handling of invalid JSON.";

  var j=0;
  function getAddress(search, next) {
geo.getLocations(search, function (result)
 {

if (result.Status.code == G_GEO_SUCCESS) {
 // Lets assume that the first marker is the one we want
 var p = result.Placemark[0].Point.coordinates;
 var lat=p[1];
 var lng=p[0];
 if(j == 0)
 {
map.setCenter(new GLatLng(lat, lng), 15);
 }

var latlng = new GLatLng(lat, lng);
map.addOverlay(createMarker(latlng, j));

}
j++;
next();
 }
);
  }

  var addresses = [
"Sector 10 Noida"
  ];

  // ======= Global variable to remind us what to do next
  var nextAddress = 0;

  // ======= Function to call the next Geocode operation when the reply comes back

  function theNext() {
if (nextAddress < addresses.length) {
 getAddress(addresses[nextAddress],theNext);
 nextAddress++;
}
  }

  // ======= Call that function for the first time =======
  theNext();

}

// display a warning if the browser was not compatible
else {
  alert("Sorry, the Google Maps API is not compatible with this browser");
}

</script>
  </body>

</html>

Contact Form Popup Using Jquery Ajax Php

This popup contact form allows user to create and add the popup contact forms easily in website and it is good to see the contact form on popup. That popup contact form let user to send the emails to site admin. administration page available to manage the site admin email address. and this plug-in use the Ajax to submit the contact form details.


Form Advantage:
  • Easy to configuration.
  • Ajax submission.
Click Enquery Now

HTML CODE

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Twitter Bootstrap Modal Contact Form Demo</title>
<meta name="description" content="Creating Modal Window with Twitter Bootstrap">
<link href="assets/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="http://www.propertiesdada.com/js/bootstrap.min.js"></script>
    <script>
$(document).ready(function () {
$("input#submit").click(function(){
$.ajax({
type: "POST",
url: "process.php", // 
data: $('form.contact').serialize(),
success: function(msg){
$("#thanks").html(msg)
$("#form-content").modal('hide');
},

});
});
});
    </script>

<style type="text/css">
body { margin: 50px; background: url(assets/bglight.png); }
.well { background: #fff; text-align: center; }
.modal { text-align: left; }
</style>

</head>
<body>
<div id="form-content" class="modal hide fade in" style="display: none;">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Send me a message</h3>
</div>
<div class="modal-body">
<form class="contact" name="contact">
<label class="label" for="name">Your Name</label><br>
<input type="text" name="name" class="input-xlarge"><br>
<label class="label" for="email">Your E-mail</label><br>
<input type="email" name="email" class="input-xlarge"><br>
<label class="label" for="message">Enter a Message</label><br>
<textarea name="message" class="input-xlarge"></textarea>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit" value="Send!" id="submit">
<a href="#" class="btn" data-dismiss="modal">Nah.</a>
</div>
</div>
<div id="thanks"><p><a data-toggle="modal" href="#form-content" class="btn btn-primary btn-large">Click Here</a></p></div>

</body>
</html>


process.php   PHP CODE

<?php
$myemail = 'youremail@host.com';
if (isset($_POST['name'])) {
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$message = strip_tags($_POST['message']);
echo "<span class=\"alert alert-success\" >Your message has been received. Thanks! Here is what you submitted:</span><br><br>";
echo "<stong>Name:</strong> ".$name."<br>";
echo "<stong>Email:</strong> ".$email."<br>";
echo "<stong>Message:</strong> ".$message."<br>";


$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new message. ".
" Here are the details:\n Name: $name \n ".
"Email: $email\n Message \n $message";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email";
mail($to,$email_subject,$email_body,$headers);

}?>

Php Mysql Refining Search Based On The Checkboxs Filters Products

Hello friends,

I programmed product search based on the filters we select product Checkboxs and dropdown in websites. I developed this in php , mysql and jquery based on my knowledge on these areas.

Here i provided the demo. Please look at. If anyone found any bugs please let me know.

Demo