I have in the system a Select where the user can select a store and next to a date and with that generate graphics.
BelowisthecodeforthisSelect:
<div class="form-group col-lg-4">
<label for="loja" class="control-label" >Loja:</label>
<select id="loja_dash" name="loja_dash" class="form-control selectpicker show-tick show-tick selecionado" data-live-search="true">
<option value="SELECIONAR_LOJA">Selecione uma Loja...</option>
<?php
for ($i = 0; $i < count($_SESSION["SESSION_Emp_Combo"]); $i++){
$selectedEmp = "";
if ($_SESSION["SESSION_Count_Emp_Combo"] == 1) {
$selectedEmp = 'selected';
}
?>
<option value="<?php echo $_SESSION["SESSION_Emp_Combo"][$i]['EMP'].'|'. $_SESSION["SESSION_Emp_Combo"][$i]['DSEMP']; ?>" <?php echo $selectedEmp; ?> >
<?php echo $_SESSION["SESSION_Emp_Combo"][$i]['DSEMP']." "."[".$_SESSION["SESSION_Emp_Combo"][$i]['EMP']."]"; ?>
</option>
<?php
}//fim do for
?>
</select>
</div>