21/08/2007, 15:36
|
| | | Fecha de Ingreso: enero-2004 Ubicación: Matamoros, Tamaulipas
Mensajes: 305
Antigüedad: 20 años, 3 meses Puntos: 3 | |
Campos Obligatorios con Conprovacion? Hola, tengo un formulario de contacto y quisiera hacer unos campos obligatorios que tambien se comprueben si tienen coherencia por ejemplo que escriban un telefono valido o un email valido(preferentemente). Gracias, Aqui les dejo el codigo del formulario que tengo: Código PHP: <style type="text/css"> <!-- body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; } .Estilo3 { color: #FFFFFF; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; } body { background-color: #F1F2F4; } --> </style> <title>MAYKO.COM.MX - CONTACTENOS</title><table width="692" border="0" align="left"> <tr> <td colspan="4"><img src="contacto_r1_c1.jpg" width="700" height="220" /></td> </tr> <tr> <td width="77" align="left" valign="top"><img src="ico_buzon.jpg" width="74" height="58" /></td> <td width="226" align="left" valign="top"><p><strong>Contacto a las Oficinas: </strong></p> <p>Av. Glandorf No. 3308<br /> Col. San Felipe, C.P. 31070<br /> Chihuahua, Chih., México.</p> <p>Información, dudas y/o comentarios:<br /> <a href="mailto:[email protected]">info@mayko.com.mx</a></p> <p>Ventas:<br /> <a href="mailto:[email protected]">ventas@mayko.com.mx</a></p></td> <td width="61" height="107" align="left" valign="top"><p><img src="ico_tel.jpg" width="61" height="58" /></p> </td> <td width="324" align="left" valign="top"><table width="238" border="0"> <tr> <td width="95">Tel:</td> <td width="133">(614) 414 8953</td> </tr> <tr> <td>Fax:</td> <td>(614) 414 3479</td> </tr> </table> <p> </p> <p> </p> <p> </p></td> </tr> <tr> <td colspan="4"><hr width="700" /></td> </tr> <tr> <td colspan="4" bgcolor="#999999"><div align="center" class="Estilo3"><strong>Formulario de Contacto :</strong></div></td> </tr> <tr> <td colspan="4"><form action="enviar.php" method="post" > <table width="700" border="0"> <tr> <td width="150" align="left" valign="top"><strong>Asunto</strong>:</td> <td width="540"><label> <input name="asunto" type="text" id="asunto" /> </label></td> </tr> <tr> <td align="left" valign="top"><strong>Nombre y Apellido</strong>:</td> <td><label> <input name="nombre" type="text" id="nombre" /> </label></td> </tr> <tr> <td align="left" valign="top"><strong>Empresa:</strong></td> <td><input name="empresa" type="text" id="empresa" /></td> </tr> <tr> <td align="left" valign="top"><strong>Telefono:</strong></td> <td><input name="lada" type="text" id="lada" value="Lada" size="3" /> <input name="tel" type="text" id="tel" /></td> </tr> <tr> <td align="left" valign="top"><strong>Direccion:</strong></td> <td><input name="dir" type="text" id="dir" /></td> </tr> <tr> <td align="left" valign="top"><strong>Correo:</strong></td> <td><input name="correo" type="text" id="correo" /></td> </tr> <tr> <td align="left" valign="top"><strong>Mensaje</strong>:</td> <td><label> <textarea name="mensaje" cols="50" rows="10" id="mensaje"></textarea> </label></td> </tr> <tr> <td> </td> <td><label> <input name="action" type="hidden" value="send"> <input type="submit" name="Submit" value="Enviar" /> <input type="reset" name="Submit2" value="Restablecer" /> </label></td> </tr> </table> </form> </td> </tr> <tr> <td colspan="4"><img src="contacto_r3_c1.jpg" width="700" height="100" /></td> </tr> </table> |