I'm creating an application that searches MLS listings with a dropdown list of items to search from. There are two dropdown boxes for price (Min Price and Max Price). Each item in the list is incremented by $25,000 (ie. 0, 25,000, 50,000, 75,000, etc).
I'm using the GET method for sending values, so (theoretically) it would be possible to manipulate these values to something like, say 50,001 in the URL. I want to make sure the value passed to the script matches at least one value in the dropdown select box. My first option would be to do something like:
If (isset($_GET['maxprice']) {
$i = $_GET['maxprice'];
if ($i == "25000" || $i == "50000" || $i == "75000"............etc)
}
However, in my case there are about 50 conditions to test. Would there be a better way to do this?