Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/11/2007, 10:18
luzdel
 
Fecha de Ingreso: noviembre-2007
Mensajes: 13
Antigüedad: 16 años, 5 meses
Puntos: 0
Pregunta busqueda en bd mysql

hola quisiera saber si pueden ayudarme con esto:
necesito hacer una consulta con codigo php a una bd mysql hasta ahora se conecta pero nose como mostrar los datos en una tabla y despues de seleccionas un dato mandarlo a otro formulario donde tengo los campos por favor ayudenme....
este es el codigo:
function BTNbuscar(){
mysql_connect('localhost', 'root', '');
mysql_select_db("biblioteca");
$qry="select * from usuarios where matricula = ('".$_POST['TXTmatricula']."')";
if (mysql_query($qry)){
echo '
<form action="" method="post">
<div align="center">
<h1 align="center"><fieldset><legend class="style2">USUARIOS</legend>
<label><span class="style3">MATRICULA</span></label>
<span class="style3">
</span>
<p class="style3">
<label>NOMBRE</label>
<input name="TXTnombre" type="text" value = "'.$qry->fields[1].'"/>
<input name="BTNbuscar" type="submit" value="BUSCAR" align="right"/>
<p class="style3">
<label>APELLIDO PATERNO</label>
<input name="TXTapaterno" type="text" value = "'.$qry->fields[2].'"/><p class="style3">
<label>APELLIDO MATERNO</label>
<input name="TXTamaterno" type="text" value = "'.$qry->fields[3].'"/><p class="style3">
<label>CARRERA</label>
<input name="TXTcarrera" type="text" value = "'.$qry->fields[4].'"/><p class="style3">
<label>SEMESTRE</label>
<input name="TXTsemestre" type="text"value = "'.$qry->fields[5].'"/>
<p class="style3">
<BR><BR>