If you are asking how to build the query string from passed form data - i was working on something similar that had a form with multiple text fields that could be filed in or not. I hope it helps you .
$querystring = "";
$querytext = "Displaying Data ";
If (!empty($instrument))
{
$querystring = $querystring . " a.instrument='$instrument' and";
$querytext = $querytext . " for Instrument <b>$instrument</b> and ";
}
If (!empty($catagory))
{
$querystring = $querystring . " a.category='$catagory' and";
$querytext = $querytext . " in the Category <b>$catagory</b> and";
}
If (!empty($title))
{
$querystring = $querystring . " a.name like '%$title%' and";
$querytext = $querytext . " with <b>$title</b> in the name of the disk and";
}
$querystring = substr($querystring,0,strlen(chop($querystring))-3);
$querytext = substr($querytext,0,strlen(chop($querytext))-3);