Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/04/2016, 09:45
neocalichin
 
Fecha de Ingreso: enero-2012
Mensajes: 158
Antigüedad: 12 años, 10 meses
Puntos: 1
Información Respuesta: combobox sin perder seleccion

Perdon este es
Código PHP:
              <form method="post" name="ver" id=ver> 
              <div class="md-card-content">
                    <div class="uk-grid" data-uk-grid-margin="">
                   
                        <div class="uk-width-medium-3-10">
                            <div class="uk-margin-small-top">
                               <label for="product_search_name"><b>CATALOGO :</b></label>
                                <?php
                                
                                      $consulta
="SELECT * FROM tge_catalogo";
                                      
$rsUd=sqlsrv_query($conn,$consulta);
                                         
                                    echo 
"<select name='catalogo' data-md-selectize id='product_search_status'>";
                                    echo 
"<option value=''>Seleccionar</option>";
                                    while(
$registro=sqlsrv_fetch_array($rsUd))
                                    {
                                        
                                    if(
$_POST["catalogo"]==$registro[0])
                                        {
                                                    echo 
"<option value='".$registro[0]."' selected>&nbsp;&nbsp;".utf8_encode($registro[1])."</option>";
                                        }
                                        else
                                        {
                                                    echo 
"<option value='".$registro[0]."'>&nbsp;&nbsp;".utf8_encode($registro[1])."</option>";
                                        }
                                          
                                          
                                    }
                                    echo 
"</select>";
                                    
?>
                                    
                    
                                    
                                
                            </div>
                        </div>
                        
                        <div class="uk-width-medium-3-10">
                         <div class="uk-margin-small-top">
                            <label for="product_search_name"><b>ARTICULO :</b></label>
                            <?php
                            $opcion
="NO";
                            if (
$tipocliente <> $opcion)
                            {
                                echo 
"<input type='text'  name='articulos' id='articulos' onKeyUp='javascript:this.value=this.value.toUpperCase();' maxlength='20' value=\""; if(isset($_POST['articulos'])) echo $_POST['articulos']; echo "\" >";
                            }
                                else
                            {
                              echo 
"<input type='text'  onKeyUp='javascript:this.value=this.value.toUpperCase();' maxlength='10' readonly >";
                            }
                            
?>
                        </div>
                       </div>
                        <div class="uk-width-medium-2-10 uk-text-center">
                            <?php
                            $opcion
="NO";
                            if (
$tipocliente <> $opcion)
                            {
                                echo 
"<button type='submit' class='md-btn md-btn-primary uk-margin-small-top' onClick='valida_envia()'>BUSCAR</button>";
                            }
                                else
                            {
                              echo 
"<button type='submit' class='md-btn md-btn-primary uk-margin-small-top' onClick='valida_envia()' disabled='disabled'>BUSCAR</button>";
                            }
                            
?>
                           
                            <!--<button type="submit" class="md-btn md-btn-primary uk-margin-small-top" onClick="valida_envia()">BUSCAR</button>  -->
                        </div>
                    </div>
                </div>
                

        
            </form>