Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/12/2010, 19:01
helsingius
 
Fecha de Ingreso: diciembre-2008
Mensajes: 52
Antigüedad: 16 años, 2 meses
Puntos: 0
Validar Datos de Formulario

Mi formulario es este quisiera que los campos tuviera un numero de caracteres como mínimo y que en teléfono solo se puedan poner numero y no letras así mismo un numero de caracteres...


<html>
<head>
<title>Formulario de Registro</title>
</head>

<body>
<form name="form1" method="post" action="http://localhost/insertar.php">
<font face="Arial" color="#336699">Registro</font><p>
<font face="Century Gothic" size="2" color="#336699">Nombre:<br>
</font>
<label>
<font face="Century Gothic" color="#336699">
<input name="username" type="text" id="username" size="20"></font><font size="2" face="Century Gothic" color="#336699">
</font>
</label>
</p>
<p><font face="Century Gothic" size="2" color="#336699">Contraseña:<br>
</font>
<label>
<font face="Century Gothic" color="#336699">
<input name="password" type="password" id="password" size="20"></font><font size="2" face="Century Gothic" color="#336699">
</font>
</label>
</p>
<p><font face="Century Gothic" size="2" color="#336699">Nombres:<br>
</font>
<label>
<font face="Century Gothic" color="#336699">
<input name="nombre" type="text" id="nombre" size="20"></font><font size="2" face="Century Gothic" color="#336699">
</font>
</label>
</p>
<p><font face="Century Gothic" size="2" color="#336699">Apellidos<br>
</font>
<label>
<font face="Century Gothic" color="#336699">
<input name="apellidos" type="text" id="apellidos" size="20"></font><font size="2" face="Century Gothic" color="#336699">
</font>
</label>
</p>
<p><font face="Century Gothic" size="2" color="#336699">Tel&eacute;fono:<br>
</font>
<label>
<font face="Century Gothic" color="#336699">
<input name="telefono" type="text" id="telefono" size="20"></font><font size="2" face="Century Gothic" color="#336699">
</font>
</label>
</p>
<p><font face="Century Gothic" size="2" color="#336699">Email:<br>
</font>

<label>
<font face="Century Gothic" color="#336699">
<input name="email" type="text" id="email" size="20"></font><font size="2" face="Century Gothic" color="#336699">
</font>

</label>
</p>
<p>
<label>
<font face="Century Gothic">
<input type="submit" name="Submit" value="Enviar Registro"></font><font size="2" face="Century Gothic">
</font>
</label>
</p>

</form>
</body>
</html>

Anteriormente estaba entrado pero tiene años que no vuelto a tomar esto entonces quisiera me orientaran gracias