Ver Mensaje Individual
  #7 (permalink)  
Antiguo 08/09/2009, 11:45
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: filtrar contenido delimitar busqueda

Algo así

Código PHP:
Ver original
  1. <?php
  2. if(isset($_GET["hotel"])){
  3.   $query=mysql_query("SELECT * FROM tabla WHERE hotel = '".$_GET["hotel"]."'");
  4.   $hoteles = "";
  5.   while($row = mysql_fetch_assoc($query)){
  6.     $hoteles .= $row["hotel"]."<br />";
  7.   }
  8. }
  9. ?>
  10. <form name="formulario" action="pagina.php">
  11. <select name="hotel" onchange="document.formulario.submit">
  12. <option value="hotel1">hotel1</option>
  13. <option value="hotel2">hotel2</option>
  14. <option value="hotel3">hotel3</option>
  15. <option value="hotel4">hotel4</option>
  16. </select>
  17. </form>
  18. <?php echo $hoteles; ?>
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos