Ciao, grazie per la risposta...
purtroppo non mi va ancora....Posto tutto il codice:

codice:
<script type="text/javascript">
<!--
function control() {
	if (nome==""){
	var answer = alert("Attenzione, non hai riempito il campo relativo al tuo nome!");
        return false;
	}
if (cognome==""){
	var answer = alert("Attenzione, non hai riempito il campo relativo al tuo cognome!");
        return false;
	}
        return true;

}
</script>
codice:
<form method="post" action="elabora.php" onsubmit="return control();">
   
   <table width="300" border="0" align="center">
     <tr>
       <td>Nome</td>
       <td>
         <input name="nome" type="text" />
       </td>
     </tr>
     <tr>
       <td>Cognome</td>
       <td>
	     <input name="cognome" type="text"   />
	   </td>
     </tr>

       </table>
   
   <p align="center">
     <input type="submit" name="Registra" value="Registra" />
   </p>
 
</form>
Dove può stare il problema?
Grazie in anticipo!