Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/05/2004, 18:10
kike666
 
Fecha de Ingreso: mayo-2004
Ubicación: Ocotlan
Mensajes: 27
Antigüedad: 19 años, 10 meses
Puntos: 0
Ya no sale error, no se que hice, pero ya no salio, ahora no me muestra nada

y asi esta el codigo del buscador.PHP, el otro quedo =


Código PHP:
<html> 
<body> 
  
<?php 
if ($_POST['buscar']==""){ 
      echo 
"Debe especificar una cadena a buscar"
      echo 
"</html></body> \n"
      exit; 

$link mysql_connect("localhost""root"""); 
mysql_select_db("prueba"$link); 
$result mysql_query("SELECT * FROM alumnos WHERE nombre LIKE '%$buscar%' ORDER BY nombre"$link);
if (
$row mysql_fetch_array($result)){
      echo 
"<table border = '1'> \n"
//Mostramos los nombres de las tablas 
echo "<tr> \n"
while (
$field mysql_fetch_field($result)){ 
            echo 
"<td>$field->name</td> \n"

      echo 
"</tr> \n"
do { 
            echo 
"<tr> \n"
            echo 
"<td>".$row["nombre"]."</td> \n"
            echo 
"<td>".$row["especialidad"]."</td> \n"
            echo 
"<td>".$row["turno"]."</td> \n";  
            echo 
"</tr> \n"
      } while (
$row mysql_fetch_array($result)); 
            echo 
"</table> \n"
} else { 
echo 
"¡ No se ha encontrado ningún registro !"

?> 
  
</body> 
</html>