$query1 = "INSERT into utenti (id_utente, nome_utente, cognome_utente) value ('', '$nome_utente', '$cognome_utente')";
$res1=mysql_query($query1);
$appo=mysql_insert_id();
$query2 = "INSERT into indirizzo_utenti (id, id_utente, indirizzo_utente, sesso_utente, telefono_utente) value ('', '$appo', '$indirizzo_utente', '$sesso_utente', '$telefono_utente')";
$res2=mysql_query($query2);