Hi,
How about something like:
if($POST[animal] == "")
{
$animal = '%';
}
else
{
$animal = $POST[animal];
}
this would in your query result in an accept all if the field is empty, or the specified value if something is specified.
An other way is to build your query from subsets, but this is a bit more complex, with the 'where' and the 'and' statements..
J