Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<script language="javascript">
/*************************************************/
function isText(){
//Sólo permite la escritura de una cadena
if ((event.keyCode >= 48) && (event.keyCode <= 57)){
event.returnValue=false;}
}
/*****************************************************/
function isMovil(){
//Sólo permite la escritura de un número '0..9' o el signo '+'
if (event.keyCode != 43){
if ( event.keyCode < 48 || event.keyCode > 57 ){
return false;
}//Fin if
}//Fin if
return true;
}
/******************************************************/
function validarMail(mail){
var i=mail.value.indexOf("@");
var x=mail.value.indexOf("@",i+1);
var p=mail.value.indexOf(".",i);
if ((i==-1) || (p<(i+2)) || (x>i) || (p>=(mail.value.length-2)))
{
return false
}else
return true;
}
function isNumero(){
//Sólo permite la escritura de un número
if (event.keyCode < 48 || event.keyCode > 57){
event.returnValue=false;}
}
</script>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#EBECFE">
<form name="form" method="post" action="solicitud-insertar.php" onsubmit="return ValidarFormulario(form)">
<div align="center">
<table width="575" height="402" border="1" cellpadding="0" cellspacing="0" bordercolor="#A0C6E5">
<!--DWLayoutTable-->
<tr>
<td height="37" colspan="7" bordercolor="#A0C6E5" bgcolor="#A0C6E5"><div align="center"><strong><font size="5">Datos Personales</font></strong></div></td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="21" colspan="7"> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td width="51" height="36"> </td>
<td width="147"><strong><font color="#000000">Dni</font></strong></td>
<td colspan="4"><input name="dni" type="text" id="dni" size="9" maxlength="9"></td>
<td width="28"> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="36"> </td>
<td><strong><font color="#000000">Nombre</font></strong></td>
<td colspan="4"><input name="nombre" type="text" id="nombre" size="25" maxlength="25" onKeypress="isText();"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="36"> </td>
<td><strong><font color="#000000">Apellidos</font></strong></td>
<td colspan="4"><input name="apellidos" type="text" id="apellidos" size="50" maxlength="50" onKeypress="isText();"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="36"> </td>
<td><strong><font color="#000000">Dirección</font></strong></td>
<td colspan="4"><input name="direccion" type="text" id="direccion" size="50" maxlength="50"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="36"> </td>
<td><strong><font color="#000000">Fecha Nacimiento</font></strong></td>
<td colspan="4"><input name="nacimiento" type="text" id="nacimiento" size="10" maxlength="10"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="36"> </td>
<td><strong><font color="#000000">Telefono</font></strong></td>
<td colspan="4"><input name="telefono" type="text" id="telefono" size="9" maxlength="9" onKeypress="isNumero();"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="38"> </td>
<td><strong><font color="#000000">Mobil</font></strong></td>
<td colspan="4"><input name="mobil" type="text" id="mobil" size="9" maxlength="9" onKeypress="isNumero();"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="34"> </td>
<td><strong>Tipo de Carnet</strong></td>
<td colspan="4"><select name="permiso" id="permiso">
<option value="A">Permiso A</option>
<option value="B" selected>Permiso B</option>
<option value="C">Permiso C</option>
</select></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="33"> </td>
<td><strong><font color="#000000">Email</font></strong></td>
<td colspan="4"><input name="email" type="text" id="email" size="30" maxlength="30"></td>
<td> </td>
</tr>
<tr bordercolor="#F9F9FF" bgcolor="#F9F9FF">
<td height="21" colspan="7"> </td>
</tr>
</table>
</div>
<p align="center">
<input type="reset" name="Submit2" value="Borrar">
<input type="submit" name="Submit" value="Enviar">
</p>
</form>
<table width="813" border="0">
<tr>
<td width="807">
<div align="right"><a href="../Index-2.html"><strong>volver</strong></a>
</div></td>
</tr>
</table>
<br>
<p> </p></body>
</html>