Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/08/2007, 13:55
luchope
 
Fecha de Ingreso: julio-2003
Ubicación: Colombia
Mensajes: 591
Antigüedad: 20 años, 9 meses
Puntos: 7
Re: Indicar selected a combo dinamico

Código PHP:
<select name="country"> 
        <option value="">seleccione</option>
        <?
          
require_once ("conectar.php");
          
$rs mysql_query("select * from country"$link);
           while ( 
$vec mysql_fetch_array($rs) )
          {
        echo 
"<option value=$vec[id_country] "
            if (
$vec[nom_country] == 'colombia'
               echo 
" selected";
            echo 
" >".$vec[nom_country]."</option>";
      }
      
        
?>        
  </select>
__________________
Visita www.legionlandrover.com