I have a problem using many dropdown/select in which i needed
to filter everytime i change the dropdown I dont know how to do this.
for example:

     1st dropdown is location *which I selected* **pasig** it should filter
       -> 2nd is bedroom which **pasig** has **3** data *1,2,4* it should filter
          -> 3rd is the **price** which consist of only **1 data** to filter


<?php
    mysql_connect('localhost','root','')or die(mysql_error());
    mysql_select_db('_location');
?>
<select id="loc" name="location" onchange="location_check()">
    <option></option>
    <?php 
        $query = mysql_query("SELECT DISTINCT(`location`) FROM locs");
        while($run = mysql_fetch_assoc($query)){
    ?>
    <option><?php echo $run['location'] ?></option>
        <?php } ?>
</select>

<select id="bedroom" name="bedroom">
    <option></option>
    <?php 
        $query = mysql_query("SELECT DISTINCT(`bedroom`) FROM locs");
        while($run = mysql_fetch_assoc($query)){
    ?>
    <option><?php echo $run['bedroom'] ?></option>
        <?php } ?>
</select>


<select name="price_range">
    <option></option>
    <?php 
        $query = mysql_query("SELECT DISTINCT(`price_range`) FROM locs");
        while($run = mysql_fetch_assoc($query)){
    ?>
    <option><?php echo $run['price_range'] ?></option>
        <?php } ?>
</select>

any help would be great!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.