Salve ragazzi ho inserito un form per la registrazione dati sul mio sito, tutto funziona bene,
però se uno non compila ad esempio un campo obbligatorio al momento della registrazione gli segnala l'errore, e cancella tutti i dati già inseriti come posso fare perchè venga segnalato il campo da compilare ma non cancelli gli altri dati.

il codice impostato è il seguente


<form method="POST" name="reg" action="verifreg.php">

<table border="0" width="401" id="table1">
<tr>
<td colspan="2"><font color="#800000">Dati personali:</font><hr>
</td>
</tr>
<tr>
<td width="44%"><font color="#000080">Nome:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t1" size="20" onChange="conferma(this)" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Cognome:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t2" size="20" onChange="conferma(this)" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Data di nascita:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t13" onChange="confermadata(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Luogo di nascita:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t14" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%" height="22"><font color="#000080">Sesso:</font></td>
<td height="22" width="54%">
<select size="1" name="D1" style="width: 45; height: 15; background-color: #D3DEF1">
<option selected value="Maschio">M</option>
<option value="Femmina">F</option>
</select></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Indirizzo:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t4" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">C.A.P:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t5" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Località:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t6" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Provincia:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t60" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width='205'>Stato:</td>
<td>
<input type="text" name="t7" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Codice fiscale:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t9" onChange="conferma(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"></td>
<td width="54%"></td>
</tr>
<tr>
<td colspan="2"><font color="#800000">Contatti: </font><hr></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Telefono:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t12" onChange="confermatel(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">E-mail:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t8" onChange="confemail(this)" size="20" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="2"><font color="#800000">Dati per il login:</font><hr>
</td>
</tr>
<tr>
<td width="44%"><font color="#000080">Username:</font></td>
<td width="54%"><font size="1">
<input type="text" name="t10" size="20" onChange="userleng()" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Password:</font></td>
<td width="54%"><font size="1">
<input type="password" name="t11" size="20" onChange="verpassword()" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
<tr>
<td width="44%"><font color="#000080">Conferma password:</font></td>
<td width="54%"><font size="1">
<input type="password" name="conf" size="20" onChange="confpassword()" style="font-size: 10pt; width: 155; height: 18; color: #800000; border: 1px solid #88AEF7; background-color: #D3DEF1"></font></td>
</tr>
</table>






<center><input value="Registrati" type="submit">
</form></center>


Grazie ..............