Prueba así tu código:
Código PHP:
<html>
<head>
<title>Buscador</title>
</head>
<body>
<H1>Buscador de productos:</H1>
<form action ="buscar.php" method ="post">
Buscar: <input type = "text" name ="palabra">
<input type="submit" name="buscador" value="Buscar">
</form>
<?php
include("conectar.php");
$link = Conectarse();
if($_POST['buscador'])
{
$buscar = $_POST['palabra'];
if(empty($buscar))
{
echo "No se ha ingresado una cadena a buscar";
}
else
{
$result = mysql_query("SELECT * FROM productos WHERE codigo LIKE '%$buscar%' ORDER BY codigo DESC",$link) or die( mysql_error() );
}
?>
<p> </p>
<table border = "1" cellspacing = "1" cellpadding = "1">
<tr>
<th>Codigo</th>
<th>Descripcion</th>
<th>Planos</th>
</tr>
<?php
while($row = mysql_fetch_array($result))
{
echo '<tr>';
echo '<td>'.$row['codigo'].'</td>';
echo '<td>'.$row['descripcion'].'</td>';
echo '<td><a href =$row[planos]>Descargar</a></td>';
echo '</tr>';
}
}
mysql_free_result($result);
mysql_close($link);
?>
</table>
</body>
</html>
Saludos.