Codice PHP:
if(!isset($_POST['Cogn_nome']) || !isset($_POST['eta']))
{
     echo 
"Inserire almeno un filtro";
}
else
{
   
$where="";
   if(isset(
$_POST['Cogn_nome'])) 
    { 
        
$Cogn_nome mysql_real_escape_string($_POST['Cogn_nome']);
        
$where "ea.cogn_nome LIKE '%".trim($Cogn_nome)."%'"
    } 
   if(isset(
$_POST['eta'])) 
    { 
        
$eta mysql_real_escape_string($_post['eta']);
        if(
$where!="")
        {
            
$where." AND";
        }
        
$where .= " ea.eta LIKE '%".trim($eta)."%'"
    }