Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/12/2005, 13:45
pablobaez
 
Fecha de Ingreso: octubre-2005
Mensajes: 129
Antigüedad: 18 años, 7 meses
Puntos: 0
ahy esta

lo he intentado de varias maneras pero me resulta,,,, no hay caso que muestre los datos





<html>
<head>
<body>
<?php
$link =mysql_connect("localhost","root");
if (!$link)
{
die('No hubo conexión�'.mysql_error());
}
$buscar_datos=mysql_select_db("prueba",$link);
if (!$buscar_datos)
{
die('no se encontro la base de datos'.mysql_error());
}
$rut =$_GET['rut'];
$result= mysql_query("select rut, nombre, correo from prueba.datos where rut=$rut) or die (mysql_error());
?>

<table>
<form method="Get" action="">
<tr>
<td>Parametro de busqueda</td>
<td><input type="text" ></td>
<td><input type="submit" name ="rut" ></td>
</tr>
</table>


<table border=1>
<tr>
<td>Rut</td>
<td>Nombre</td>
<td>Correo</td>
</tr>

<?php
while($row=mysql_fetch_row($result))
{
echo '<tr><td>'.$row['rut'].'</td>';
echo '<td>'.$row['nombre'].'</td>';
echo '<td>'.$row['correo'].'</td></tr>';
}
mysql_free_result($result);
?>
</table>




</form>

</body>
</html>