0

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!!

2
Contributors
1
Reply
8
Views
3 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.