Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/06/2011, 19:05
Alber_h
 
Fecha de Ingreso: septiembre-2009
Mensajes: 138
Antigüedad: 14 años, 8 meses
Puntos: 3
Respuesta: Buscar en Php

ahi te pongo todo completo;

<input name="nombrebus" type="text" id="nombrebus">

<?php

$conexion=mysql_connect("localhost","root","");

$selectdb=mysql_select_db("db_mpsm");

$consulta=mysql_query($selectdb);

?>



<?php
$selbus="select * from usuario where Nombre='".$_POST['nombrebus']."'";
$ejeselbus=mysql_query($selbus);
echo "<table id=tabla width=500 border=1 align=center>";
echo "<tr id=celdas name=celdas align=center width=350>";
echo "<td width=250 name=id>Nombre</td>";
echo "<td width=250>Apellido</td>";
echo "<td width=250 name=id>Direccion</td>";
echo "<td width=250>Edad</td>";
echo "<td width=250 name=id>Dni</td>";
echo "<td width=250>Correo</td>";
echo "</tr></table>";
while($ins=mysql_fetch_array($ejeselbus))
{
echo "<table id=tabla width=500 border=1 align=center>";
echo "<tr id=celdas name=celdas align=center width=350 onmouseover=this.style.cursor='hand'>";
echo "<td width=250 name=id>";
echo $ins[0];
echo "</td>";
echo "<td width=250 name=id>";
echo $ins[1];
echo "</td>";
echo "<td width=250 name=id>";
echo $ins[2];
echo "</td>";
echo "<td width=250 name=id>";
echo $ins[3];
echo "</td>";
echo "<td width=250 name=id>";
echo $ins[4];
echo "</td>";
echo "<td width=250 name=id>";
echo $ins[5];
echo "</td>";
echo "</tr>";
echo "</table>";
}
?>

Quisiera que cuando ponga un nombre "x" en mi caja de texto me muestre solo con ese nombre el registro.