Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/01/2008, 08:21
edenfray
 
Fecha de Ingreso: enero-2008
Mensajes: 5
Antigüedad: 16 años, 3 meses
Puntos: 0
Re: PHP-Html-JavaScript formulario al pulsar tabular se cargue la información de BD

ok. muchas gracias hice esta pueba:


<?php
foreach( $HTTP_POST_VARS as $key => $value ) { $$key=$value;}
foreach( $HTTP_GET_VARS as $key => $value ) {$$key=$value;}
if (isset($cedula)) {
$cedula_bd=$cedula;
//conectar a la bd...
if ($cedula=='13822342') {
$nombre_bd='Eden Fray';
$apellido_db='Hernandez Sucerquia';
}
}
?>
<html>
<head>
<script language="javascript" type="text/javascript">
function Verifica_cedula(){
cade_cedula=document.getElementById("cedula");
frm=document.getElementById("Forma");
frm.action="cedula.php?cedula=" + cade_cedula.value;
frm.submit();
return true;
}

</script>
</head>
<body>

<form id="Forma" name="Forma" method="post" action="">
<td>Ingrese Cedula</td>
<input type="text" name="cedula" id="cedula" value="<?php echo $cedula_bd; ?>" onBlur="Verifica_cedula();"/>
Ingrese Nombre
<input type="text" value="<?php echo $nombre_bd; ?>" name="nombre" id="nombre" >
Ingrese Apellido
<input type="text" value="<?php echo $apellido_db; ?>" name="apellido" id="apellido" >
</form>
</body>
</html>

y me funciono, ahora la integrare al programa agregando los valores rerales gracias pues cuidense--