Codice PHP:
<?php
require_once('connections/connections2.php');
require_once(
'connections/mailto.php');

if(
$_POST['nome']=="" || $_POST['cognome']=="" || $_POST['codfisc']=="" ) {
?>
   <h3>Siamo spiacenti, Si è verificato un problema</h3>
<?php
} else {
        
$nick=$_POST['nick'];
        
        
$query=mysql_query("SELECT * FROM utenti WHERE nick='$nick'",$connections) or die(mysql_error());    
        if(
mysql_num_rows($query)>0) {
?>
          <h3>Questo nick è già stato registrato</h3>
<?php
        
} else {
            
// tutto bene, facciamo quel che si deve fare
        
}   
// endif
?>
Prova così.