Hello
I have a form/search page with several drop downs, then a search results page.
Both work fine but there is a problem with if someone selects "any" on one or more of the drop downs rather than a specific value. I need to know how to set the search results page to SELECT all FROM table WHERE the specific result was set to "any". Trouble is I don't know in advance which drop down they are going to leave set to "any". I could cheat and force them to select a value for each drop down but it would be nicer if "any" was available.
Currently I use the code below to alert people to a search that brings back no results but it also says no results found if they leave any fields set to "any" - which isn't necessarily true. Can anyone suggest a tutorial or give me a basic example that I can work from? I guess I need to be able to select a combination of all records and specific records in one go depending on what the user selects.
$num = mysql_num_rows ($result);
if ($num > 0) {
echo "Search found $num results";
} else {
echo "Search found no valid results";
}
Many thanks