I have a search form to query a database of new homes.
I am setting up the form to have drop down menus and I wanted to have the option for viewers to search by any.
such as.....
<select name="bed">
<option value="*">any</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
what value do I put in the form under the any option?
and how should it be put in the search.php page...
<?
mysql_connect("localhost","gatorw56_gator","scream");
mysql_select_db("gatorw56_homesearch");
$search=$_GET["models,bed,bath,garage"];
$bedrooms = $POST['bed'];
$bath = $POST['bath'];
$garage = $_POST['garage'];
$result = mysql_query("SELECT * FROM homes WHERE models LIKE '%$search%' AND bed = '".$bed."' AND garage = '".$garage."' AND bath = '".$bath."'");
while($r=mysql_fetch_array($result))
{
$models=$r["models"];
$bed=$r["bed"];
$bath=$r["bath"];
$garage=$r["garage"];
$sqft=$r["sqft"];
$id=$r["id"];
echo "<u>models:</u>$models<br> <u>bed:</u> $bed<br> <u>bath:</u> $bath<br> <u>garage:</u> $garage<br> <u>sqft:</u> $sqft<br><br>";
}
?>
when I search by any now it brings up a blank white screen.