Sostituendo $query2_txt così?
Codice PHP:
$query2_txt "select * from UTENTI where ".$dato."='".$gilda[Nome]."'"