Hola gracias por la colaboracion. Aca esta el codigo completo con el que envio los datos. Saludos...
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Nueva Persona</title>
<link href="application.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo2 {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
}
.Estilo3 {color: #000000}
-->
</style>
<script LANGUAGE="JavaScript" type="text/javascript" >
function validar(form)
{
if (form.Doc_persona.value == "") {
alert("Por favor ingrese el documento");
form.Doc_persona.focus ();
return false;
}
if (form.Nom_persona.value == "") {
alert("Por favor ingrese el nombre de la persona");
form.Nom_persona.focus ();
return false;
}
if (form.NMTelefono.value == "") {
alert("Por favor ingrese el telefono");
form.NMTelefono.focus ();
return false;
}
if (form.DSDireccion.value == "") {
alert("Por favor ingrese la direccion");
form.DSDireccion.focus ();
return false;
}
if (form.DSmunicipio.value == "") {
alert("Por favor ingrese el municipio");
form.DSmunicipio.focus ();
return false;
}
if (form.DSDepto.value == "") {
alert("Por favor ingrese el departamento");
form.DSDepto.focus ();
return false;
}
if (form.DSPais.value == "") {
alert("Por favor ingrese el país");
form.DSPais.focus ();
return false;
}
if (form.firstinput.value == "") {
alert("Por favor ingrese la fecha");
form.firstinput.focus ();
return false;
}
form.submit();
return true;
}
</script>
<script language="javascript" src="cal2.js">
/*
Xin's Popup calendar script- Xin Yang (http://www.yxscripts.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
</script>
<script language="javascript" src="cal_conf2.js"></script>
</head>
<body>
<form name="npersona" action="personas3.php" method="post">
<br />
<table width="433" border="0" align="left">
<tr>
<td>Tipo de documento: </td>
<td><select name="tipodocumento" id="tipodocumento">
<option value="N" general="general" <? if ($_GET['tdoc']=="N"){ echo 'SELECTED';}?>>N</option>
<option value="C" <? if ($_GET['tdoc']=="C"){ echo 'SELECTED';}?>>C</option>
</select></td>
</tr>
<tr>
<td width="201">Documento:</td>
<td width="218"><input name="Doc_persona" type="text" id="Doc_persona" size="40" value="<? echo $_GET['doc'];?>"/></td>
</tr>
<tr>
<td>Nombre de la persona:</td>
<td><input name="Nom_persona" type="text" id="Nom_persona" size="40" /></td>
</tr>
<tr>
<td>Teléfono: </td>
<td><input name="NMTelefono" type="text" id="NMTelefono" size="40" /> </td>
</tr>
<tr>
<td>Dirección:</td>
<td><input name="DSDireccion" type="text" id="DSDireccion" size="40" /></td>
</tr>
<tr>
<td>Municipio:</td>
<td><input name="DSmunicipio" type="text" id="DSmunicipio" size="40" /></td>
</tr>
<tr>
<td>Departamento:</td>
<td><input name="DSDepto" type="text" id="DSDepto" size="40" /></td>
</tr>
<tr>
<td>País: </td>
<td><input name="DSPais" type="text" id="DSPais" size="40" /></td>
</tr>
<input name="User_ingreso" type="hidden" id="User_ingreso" size="40" value="<? ?>" />
<input type="hidden" name="firstinput" size="20" value="<? echo date("Y/m/d");?>"/>
<tr>
<td colspan="2" align="center"><label>
<input type="submit" name="guadar" value="Guardar" onclick="return validar(this.form)"/>
<input type="button" name="cancelar" value="Cancelar" onclick="javascript:window.close();"/>
</label></td>
</tr>
</table>
</form>
</body>
</html>