I have a site where users select several options from drop-down boxes. These options are then forwarded to a php script which searches the mysql database. All working fine.
Here's where I'm stuck: one of the options on each drop-down box is "any". How do I build a query that doesn't bother with the WHERE blah=\"$blah\" if blah is "any"? Currently I'm having to resort to the following:
if ($night != "any")
{
$query = $query."AND night=\"$night\"";
}
...for a whole set of things, which leads to plenty of problems.
Many thanks for helping a learner,
Jim