Código PHP:
    
 
Ayuda con este buscador kero introducir un numero y k me muestre la tabla o tablas asociadas con ese numero ..
 
 
 
 
 
<html>
 
<body>
 
<form method = "POST" action = "buscadormanifiesto.php">
 
<strong>Numero Manifiesto:</strong>
 
<input type="text" name="buscar" size="20"><br><br>
 
<input type="submit" value="Buscar">
 
</form>
 
</body>
 
</html>
 
 
 
 
*************************************************************
 
<html>
 
<body>
 
<?php
 
if (!isset($buscar)){
 
echo "Debe especificar una cadena a buscar";
 
echo "<p>Debe especificar una cadena a buscar</p> \n";
echo "<p><a href=buscadi.php>Volver</p> \n";
 
echo "</html></body> \n";
 
exit;
 
}
 
$link = mysql_connect("localhost", "");
 
mysql_select_db("mybd", $link);
 
$sql = "SELECT * FROM manifiesto WHERE nombre LIKE '%$buscar%' ORDER BY numan";
 
$result = mysql_query($sql, $link);
 
if ($row = mysql_fetch_array($result)){
 
echo "<table border = '1'> \n";
 
//Mostramos los nombres de las tablas
 
echo "<tr> \n";
 
mysql_field_seek($result,0);
 
while ($field = mysql_fetch_field($result)){
 
echo "<td><b>$field->numan</b></td> \n";
 
}
 
echo "</tr> \n";
 
do {
 
echo "<tr> \n";
 
echo "<td>".$row["id"]."</td> \n";
 
echo "<td>".$row["numan"]."</td> \n";
 
echo "<td>".$row["fecha"]."</td> \n";
 
echo "<td>".$row["fechacance"]."</td> \n";
echo "<td>".$row["remitente"]."</td> \n";
 
echo "<td>".$row["consignatario"]."</td> \n";
 
echo "<td>".$row["numfact"]."</td> \n";
 
echo "<td><a
 
 
 
 while ($row = mysql_fetch_array($result));
 
echo "<p><a href=buscadi.php>Volver</p> n";
 
echo "</table> n";
 
} else {
 
echo "<p>¡No se ha encontrado ningún registro!</p>n";
 
echo "<p><a href=buscadi.php>Volver</p> n";
 
}
 
?>
 
</body>
 
</html>