Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/04/2007, 10:59
Avatar de claudiovega
claudiovega
 
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 21 años, 4 meses
Puntos: 11
Re: Problema con multiselect. Urgente porfavor.

Yo he hecho esto y me ha funcionado:

Código PHP:
<select name="nombre" multiple>
<?php
    $arr_nombres
=explode(",",$_GET['id']);
    
    
$result mysql_query("SELECT * FROM tabla") or die (mysql_error());

    while (
$rows0 mysql_fetch_array($result))
    {
        
extract ($rows0);
?>
    <option value="<?php echo $nombre;?><?php if(in_array($nombre,$arr_nombres)) echo "selected";?>><?php echo $nombre?></option>
<?php
    
}
?>
</select>