Sinceramente amigo Gator muchisimas gracias por tu colaboracion de verdad me sirvio de mucho y aclare algunas cosas con respecto a HTML CCS Y JAVASCRIPT
PARA LOS QUE QUIERAN AQUI DEJO EL CODIGO Y RECUERDEN NO ES TODO MIO SOLO ESTA FORMADO POR CONTRIBUCIONES DE AQUI DE FOROS DEL WEB.
PARA PROBARLO BASTA CON HACER UNA BASE DE DATOS EN MYSQL LA CUAL LLAMAREMOS empleados, CUYA UNICA TABLA SE LLAMARA datospersonales Y TENDRA 4 CAMPOS
1- cedula
2- nombre
3- apellido
4- sexo
la cargamos con alfunos datos.
luego hacemos un formulario php que pida el numero de cedula para la consulta este lo llamaremos prueba.php
aca dejo el codigo
Código PHP:
<form method="post" action="prueba2.php" />
Cedula:
<input type="text" name="cedula" size="24" maxlength="24" />
<input name="submit" type="submit" value="Buscar por Cedula" />
<br />
<br />
</form>
luego en otro archivo llamado prueba2.php es donde mostraremos el formulario con los datos cargados de la consulta, en el textbox que configuremos para eso osea lo podemos mostrar dondequeremos, aca esta el codigo de prueba2.php
Código PHP:
<?php
$cedula= addslashes($_POST['cedula']);
$con = mysql_connect("localhost","root","");
mysql_select_db("empleados",$con);
$query = mysql_query("SELECT * FROM datospersonales WHERE cedula='$cedula';");
$rowalum = mysql_fetch_assoc($query)
?>
<form id="form1" name="form1" method="post" action="">
<table width="257" border="1">
<tr>
<td width="86">cedula:</td>
<td width="155" bgcolor="#333333"><label></label></td>
<td width="155"><input name="cedula" type="text" id="cedula" value="<?php echo $rowalum['cedula']; ?>"/></td>
</tr>
<tr>
<td>nombre:</td>
<td><label>
<input name="nombre" type="text" id="nombre" value="<?php echo $rowalum['nombre']; ?>" />
</label></td>
<td bgcolor="#000000"> </td>
</tr>
<tr>
<td>apellido:</td>
<td bgcolor="#000000"><label></label></td>
<td><input name="apellido" type="text" id="apellido" value="<?php echo $rowalum['apellido']; ?> " /></td>
</tr>
<tr>
<td>sexo</td>
<td><label>
<input name="sexo" type="text" id="sexo" value="<?php echo $rowalum['sexo']; ?>" />
</label></td>
<td bgcolor="#000000"> </td>
</tr>
</table>
</form>
<?php
mysql_free_result($query);?>
cabe destacar que este codigo no funcionaria si no fuera por los aportes de ustedes muchas gracias a todos los participantes y espero que les sirva de ayuda a los novatos como yo en php.
si algun experto quisiera agregar algo con respecto a este codigo le agradeceria mucho por si acaso tengo algun error o se puede optimizar de alguna manera etc. otra vez muchas gracias.