Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/10/2007, 20:11
Avatar de jorgedx
jorgedx
 
Fecha de Ingreso: junio-2005
Ubicación: Chile, Los Andes
Mensajes: 406
Antigüedad: 18 años, 10 meses
Puntos: 4
Re: Buscar un registro

Hola emont cuando haces un requerimiento a una base de datos mysql
casi siempre es necesario trabajar con los resultados en un array, hay varias funciones para esto, yo ocupo mysql_fetch_array()

Código PHP:
$result=mysql_query("select * from admin where user=".$_POST['user']." and pwd=".$_POST['pwd'],$link); 

$result=mysql_fetch_array(r$esult
luego muestras los resultados

Código PHP:
$result=mysql_query("select * from admin where user=".$_POST['user']." and pwd=".$_POST['pwd'],$link); 

//Luego muestras los resultados

while ($result=mysql_fetch_array($result)) {
  echo  
$result["user"]." -"$result["pwd"]."<br>";
}



mysql_free_result($result); 

Hay informacion sufuciente para aprender al revez y al derecho este tema aqui
http://www.php-es.com/function.mysql-fetch-array.html
__________________
Nuevamente a las pistas ...