Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/08/2011, 13:48
Avatar de Patriarka
Patriarka
 
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 3 meses
Puntos: 288
Respuesta: Optiongroup de select

y bueno estas poniendo todo junto, hace esto:
Código PHP:
Ver original
  1. <select name="unmane">
  2.     <?php
  3.     while($fila = mysql_fetch_object($result)) { ?>
  4.        
  5.         <? if( $fila['PADRE'] == 'Ingreso'){
  6.                $INGRESO = ' <option value="3"><?php echo $fila->TDOC_NOMB; ?></option>';
  7.          } ?>
  8.            
  9.         <?php if( $fila['PADRE'] == 'Egreso'){
  10.                         $EGRESO = ' <option value="3"><?php echo $fila->TDOC_NOMB; ?></option>';
  11.  
  12.  } ?>        
  13.     <?php } ?>
  14.             <optgroup label='Ingreso'>
  15.     <?php echo $INGRESO; ?>
  16.             </optgroup>
  17.         <optgroup label='Egreso'>
  18.     <?php echo $EGRESO; ?>
  19.         </optgroup>
  20.    
  21. </select>