Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/05/2005, 06:00
Avatar de Seppo
Seppo
 
Fecha de Ingreso: marzo-2005
Ubicación: Buenos Aires, Argentina
Mensajes: 1.284
Antigüedad: 19 años, 1 mes
Puntos: 17
¿Cual es el problema que tienes con ese código? Supongo que te está devolviendo vacio...

A ver lo siguiente...
Código PHP:
<? include("../includes/config.php"); ?>
<?php
$palabra 
$HTTP_POST_VARS['palabra'];
if (isset(
$HTTP_POST_VARS['enviar'])) {
$resp mysql_query("select id, ficheroarticulo, articulo1texto, articulo2texto, articulo3texto, articulo4texto, articulo5texto from aedn_revista where articulo1texto LIKE '%".$palabra."%' or articulo2texto LIKE '%".$palabra."%' or articulo3texto LIKE '%".$palabra."%' or articulo4texto LIKE '%".$palabra."%' or articulo5texto  LIKE '%".$palabra."%'") or die (mysql_error());

if(
mysql_num_rows($resp) == 0) {
  echo 
"No hay resultados";
} else {
?>
<link href="../style/miestilo.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellpadding="0" cellspacing="3">
  <tr>
    <td class="botonform"><div align="center" class="negrita">La Revista </div></td>
  </tr>
</table>
<form action="buscador.php" method="post">
<table width="100%" height="20" border="0" align="center" cellpadding="0" cellspacing="3">
  <tr>
      <td class="footer" >
        <div align="right"> Buscador de art&iacute;culos de la Revista
            <input name="palabra" type="text" class="input_text" size="60">
            <input name="enviar" type="submit" class="inputform" value="Buscar">
      </div></td>
  </tr>
</table>
</form>
<table width="100%" height="75%"  border="0" cellpadding="1" cellspacing="5" class="marco">
  <tr class="fonsblau_claret">
    <td valign="top"><? echo "Resultados de la busqueda:<br>"?><br><br>
    <table width="100%"   border="0" cellspacing="3" cellpadding="0" class="marco">
    <?
    
while ($buscador=mysql_fetch_object($resp)){
    
?><tr>
      <td valign="top"><div align="justify"><?    
      
if (strstr($buscador['articulo1texto'],$palabra)) { ?>
<a href="../larevista/<?php echo $buscador->ficheroarticulo;?>"><? echo $buscador->articulo1texto;?></a>
      <? } elseif (strstr($buscador['articulo2texto'],$palabra)) { ?>
      <a href="ver_detalle.php"><? echo $buscador->articulo2texto;?></a>
      <? } elseif (strstr($buscador['articulo3texto'],$palabra)) { ?>
      <a href="ver_detalle.php"><? echo $buscador->articulo3texto;?></a> 
      <? } elseif (strstr($buscador['articulo4texto'],$palabra)) { ?>
      <a href="ver_detalle.php"><? echo $buscador->articulo4texto;?></a> 
      <? } elseif (strstr($buscador['articulo5texto'],$palabra)) { ?>
      <a href="ver_detalle.php"><? echo $buscador->articulo5texto;?></a> 
    <? }  ?>
    </div></td>
    </tr>
  }?>
    </table></td>
  </tr>
</table>
<?
}
}
?>