[eluser]Pert[/eluser]
You can check if post data is present at all, and then check which values to search by in the search function itself, as you already do right now.
Even with empty search criteria, the _POST array has number of items in it, just with empty string as a value, so you can do this to check if post data is present.
Code:
if ($_POST)
{
// run search routines
}
If you get alot of POST data anyway, you can insert hidden form field and name it "search-query" for example, then change the code to
Code:
if (isset($_POST['search-query']))
{
...
}