Ver Mensaje Individual
  #3  
Antiguo 28-09-2007
Avatar de richy08
richy08 richy08 is offline
Miembro
 
Registrado: may 2007
Ubicación: Bucerias, Nayarit Mexico
Posts: 529
Reputación: 17
richy08 Va por buen camino
Cita:
Empezado por poliburro Ver Mensaje
Podrías incluir el código en cuestión?.

claro que si este es el codigo

Código PHP:
<html>
<body>
<?php
 
if (!($_POST["Buscar"]))
 {
   echo 
"<p>Debe especificar una cadena a buscar</p> \n";
   echo 
"<p><a href=buscar.php>Volver</p> \n";
   echo 
"</html></body> \n";
   exit;
 }
    
$link mysql_connect("localhost""root""");
    
mysql_select_db("agenda");
    
$sql "SELECT * FROM users WHERE snombre LIKE '%$_POST[Buscar]%' ORDER BY snombre";
    
$result mysql_query($sql$link);

 if (
$row mysql_fetch_array($result))
 {
  echo 
"<table border = '1'> \n";
  
//Mostramos los nombres de las tablas
  
mysql_field_seek($result,0);
  while (
$field mysql_fetch_field($result))
  {
    echo 
"<td><b>$field->name</b></td> \n";
  }
    echo 
"</tr> \n";
  do
  {
   echo 
"<tr> \n";
   echo 
"<td>".$row["auser"]."</td> \n";
   echo 
"<td>".$row["snombre"]."</td> \n";
   echo 
"<td>".$row["sdir"]."</td> \n";
   echo 
"<td>".$row["stel"]."</td> \n";
   echo 
"</tr> \n";
   }while (
$row mysql_fetch_array($result));
   echo 
"<td><a href='mailto:".$row[""]."'>".$row[""]."</a></td> \n";
   echo 
"<p><a href=buscar.php>Volver</p> \n";
   echo 
"</table> \n";
 }
 else
 {
  echo 
"<p>¡No se ha encontrado ningún registro!</p>\n";
  echo 
"<p><a href=buscar.php>Volver</p> \n";
 }
?>
</body>
</html>
[HTML]
<html>
<body>
<form method = "POST" action = "buscador.php">
<strong>Palabra clave:</strong>
<input type="text" name="Buscar" size="20"><br><br>
<input type="submit" value="Buscar">
</form>
</body>
</html>
[/HTML]
Responder Con Cita