dimanche 22 janvier 2017

How to load data in a google maps according the value in dropdown

I want a dropdown feature on my web app where it can filter the data to load on google map. How can I load the data using the value selected on the dropdown list.

My dropdown list:

<div id="over_map" style="float:right">
          <select name="value" ">
              <option value="Select">Select</option>}
              <option value="Employed">Employed</option>
              <option value="Unemployed">Unmployed</option>
          </select> 
</div>

Here's my query:

<?php           
 $query = mysql_query("SELECT estatus FROM users")or die(mysql_error());
    while($row = mysql_fetch_array($query)){
        $fname = $row['fname'];
        $estatus= $row['estatus'];
        $lat = $row['lat'];
        $lon = $row['lon'];
        echo("addMarker($lat, $lon, '<b>$fname</b><br />$estatus');\n");
    }    
?>




Aucun commentaire:

Enregistrer un commentaire