Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/07/2011, 16:22
Avatar de skiper0125
skiper0125
 
Fecha de Ingreso: octubre-2010
Ubicación: $this->Mexico('Toluca');
Mensajes: 1.127
Antigüedad: 13 años, 6 meses
Puntos: 511
Respuesta: Radom items en select option

te dejo este ejemplo

Código PHP:
Ver original
  1. <?php
  2. $sql = mysql_query("SELECT campo1 FROM tu_tabla ORDER BY RAND()") or die (mysql_error());
  3.     echo "<select name='1' id='1'>Elige</select>";
  4.     while($dat=mysql_fetch_row($sql)){
  5.         echo "<option value='{$dat[0]}'>{$dat[0]}</option>";
  6.     }
  7.     echo "</select>";
  8. ?>

Saludos
__________________
Recuerda que estamos aquí para orientarte, y no para hacer tu trabajo.
Si mi aporte fue de ayuda, recuerda que agradecer no cuesta nada +1

Skiper0125