Unfortunately all of the variables are drop downs, so technically wouldn't isset($type) always true?
$sql = "SELECT * FROM present";
if (($type != "") || ($price != "") || ($state != "")) $sql .= " WHERE ";
if (($type != "")) $sql .= "Type = '$type' ";
if (($price != "")) $sql .= "Price $price ";
if (($state !="" )) $sql .= "Location = '$state' ";
Before you start, I have price defined in the dropdown as:
<option value="between 1 and 200">$1 - $200</option>
So yes, "Price $price" is correct.
In any event, this works so long as only one is selected. Select any more than one option and I run into problems where i need an AND statement.
Any suggestions?