giustamente perche sei in un ciclo.
ma perche non effettui una query condizionata del tipo
Codice PHP:
$dati="SELECT nome_utente FROM registrazione_utente where nome = '".$nome."'"
oppure
Codice PHP:
$dati="SELECT count(id) FROM registrazione_utente where nome = '".$nome."'"
e successivamente utilizzi la funzione mysql_num_rows per controllare se esiste o meno quel nome..

altrimenti prova ad inserire
Codice PHP:
while($data=mysql_fetch_object($res)){
  if(
$nome==$data->nome_utente){
     echo
"1";
     break;
  }
   else{
     echo
"0";
     continue;
   }