Ver Mensaje Individual
  #4 (permalink)  
Antiguo 19/04/2007, 15:10
Avatar de gerson
gerson
 
Fecha de Ingreso: febrero-2005
Ubicación: Lima
Mensajes: 481
Antigüedad: 19 años, 3 meses
Puntos: 4
Re: Posicion inicial en un select

Hola JCiernes tienes q poner un if e igualar los datos del cliente y el listado, asi de esta manera:
Código PHP:
<select size="1" name="cat_id">
    <?
    
while ($row2=mysql_fetch_array($resultado))
    {
    echo 
"<option value=$row2[cat_id]";
    if (
$row1[cliente_cat_id] == $row2[cat_id]){echo " selected";}
    echo 
">$row2[cat_nom]</option>";
    }
    
?>
</select>
Saludos
__________________