The way i would do it is:
$sql = "SELECT * FROM table_name WHERE ";
if(!empty($FormField1))
{
$sql .= " table_column = '$FormField1' ";
}
if(!empty($FormField2))
{
$sql .= " || table_column = '$FormField2' ";
}
...
Basically, you use php to build a query for you. What is included in the query depends on the fields that user filled in.
Richie
http://geocities.com/akindele/