Tema: Consulta Sql
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/05/2006, 10:11
Avatar de mauled
mauled
 
Fecha de Ingreso: marzo-2005
Ubicación: Cd. de México.
Mensajes: 3.001
Antigüedad: 19 años, 1 mes
Puntos: 33
Espero haber entendido tu problema

Supongamos los siguiente
Código HTML:
<html>
<body>
<form action="buscar.php" method="POST" >
<input type="text" name="search" />
<input type="submit" value="Enviar" />
</form>
</body>
</html> 

buscar.php
Código PHP:
<?php
$busqueda 
$_POST['search'];

mysql_connect("localhost","root","")or die(""Error en la conexion);
mysql_select_db("ejemplo");

$res mysql_query("Select * from empleado where id=".$busqueda."");
while(
$row mysql_fetch_array($res));
{
  echo 
"-->".$row["nombre"]."<br>";
   echo 
"-->".$row["domcilio"]."<br>";

}


?>