Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/07/2005, 20:49
aaronmx
 
Fecha de Ingreso: abril-2005
Ubicación: Guadalajara, Jalisco
Mensajes: 113
Antigüedad: 19 años
Puntos: 0
error buscando 2 veces

Bueno ya tengo un codigo parecido pero ahora si buscas algo si sale pero si vuelves a buscar ya no sale nada y no se que es te dejo el codigo haber si me podrian ayudar

Código PHP:
<?php
include("conexio.php");
if(
$enviar) {


$tabla "descargas"// Tabla donde queremos buscar
$campo "descripcion"// Campo donde queremos buscar


$resp mysql_query("select * from $tabla where $campo LIKE '%".$_POST[palabra]."%'") or die (mysql_error());
if(
mysql_num_rows($resp) == "0") {
echo 
"No hay resultados";
} else {
echo 
"Estos son los resultados de la busqueda:<br>";
while(
$sql mysql_fetch_array($resp)) {

echo 
"<table cellSpacing='0' cellPadding='2' width='100%' align='center' border='0'>
  <tr>
    <td width='100%'>
      <table style='BORDER-COLLAPSE: collapse' borderColor='#111111' cellSpacing='0' cellPadding='0' width='100%' border='0' height='54'>
        <tbody>
          <tr>
            <td style='FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: arial' width='94%' height='17'><span style='FONT-SIZE: 8pt'>
                <strong style='font-weight: 400'> <a href='http://www.descargasdirectas.net/descargas.php/id/"
.$sql[id]."'>".$sql[nombre]."</a></strong><strong style='font-weight: 400; font-size: 8pt'></strong></span></td>
            <td noWrap width='58' height='17'>
              <p align='center'></p>
            </td>
          </tr>
          <tr>
            <td style='FONT-SIZE: 8pt; COLOR: #435050; FONT-FAMILY: arial' width='94%' height='21'> "
.$sql[descripcion]."</td>
            <td noWrap width='58' height='21'>
              <div align='center'>
                &nbsp;
              </div>
            </td>
          </tr>
          <tr>
            <td style='FONT-SIZE: 8pt; COLOR: #435050; FONT-FAMILY: arial' height='16'><font color='#000000' size='1'>categoria</font><font color='#999999' size='1'>:
              </font><font color='#008000' size='1'> "
.$sql[categoria]."</font><font color='#999999' size='1'>
              </font><font color='#000000' size='1'>Tamaño</font><font color='#999999' size='1'>:</font><font color='#008000' size='1'>"
.$sql[tamaño]." &nbsp;</font></td>
            <td noWrap width='58' height='16'><font size='1'>&nbsp;</font></td>
          </tr>
        </tbody>
      </table>
    </td>
  </tr>
  <tr>
    <td width='100%'><img height='1' src='http://www.descargasdirectas.net/imagenes/linea_menu.gif' width='397' border='0'></td>
  </tr>
</table>"
;


  }
}
}

?>