If you want to have multiple form elements to build up your querystring, this might be a little easier to do:
Property Type:
<select name="type">
<option value="all">Any property</option>
<option value="flat">flat</option>
<option value="house">house</option>
</select>
<br><br>
Number Bedrooms:
<select name="bedrooms">
<option value="all">Any Number</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5+">5+</option>
</select>
<br><br>
Price:
<select name="price">
<option value="all">Any Price</option>
<option value="upto50">up to 50k</option>
<option value="50-80">50 - 80k</option>
<option value="80-100">80 - 100k</option>
<option value="over100">over 100k</option>
</select>
<?php
$sql = "select * from selling,areas,types where (selling_area = areas_id AND selling_type = types_id) ";
// property type selector
if($POST['type'] != "all") {
$sql = $sql + " and types_name = " . $POST['type'];
}
// num bedrooms selector
if($POST['bedrooms'] != "all") {
if ( $POST['bedrooms'] == "5+"){
$sql = $sql + " and selling_rooms >= 5 ";
} else {
$sql = $sql + " and selling_rooms= " . $_POST['bedrooms'];
}
}
// price bracket selector
if($POST['price'] == "upto50") $sql = $sql + " and selling_price <= 50000 ";
if($POST['price'] == "50-80") $sql = $sql + " and (selling_price >= 50000 and selling_price <=80000 )";
if($POST['price'] == "80-100") $sql = $sql + " and (selling_price >= 80000 and selling_price <=100000 )";
if($POST['price'] == "over100") $sql = $sql + " and selling_price >= 100000 ";
?>
That should sort you out matey.
Myke.