Comboxbox code:
<div class="profile-info-row">
<div class="profile-info-name"> Empresa </div>
<div class="profile-info-value">
<select name="empresa_destino" id="form-field-1" class="col-xs-11 col-sm-6 col-md-8">
<option value="">Selecione a Empresa</option>
<option value="1">Emp1</option>
<option value="2">Emp2</option>
<option value="3">Emp3</option>
</select>
</div>
</div>
PHP code to return bank values:
<?php
session_start();
if (!isset($_SESSION["logado"]) || $_SESSION["logado"] != TRUE) {
header("Location: login.html");
}
include "conexao.php";
include "executaSQL.php";
$SQL = "SELECT cod_empresa , razao_social FROM 'tbl_empresa'";
$link= conectar ();
$inserido = executaSQL($SQL, $link);
?>
EDIT:
I was able to adjust this code of mine:
<div class="profile-info-value">
<?php
include "conexao.php";
include "executaSQL.php";
$link=conectar();
$busca_query = mysql_query("SELECT cod_empresa,razao_social FROM tbl_empresa")or die(mysql_error());
?>
<select name="empresa_destino" id="form-field-1" class="col-xs-11 col-sm-6 col-md-8">
<option value="" selected disabled="disabled" hidden>Selecione a Empresa</option>
<?php while ($dados = mysql_fetch_array($busca_query)) { ?>
<option value="<?php echo $dados['cod_empresa']; ?>"><?php echo $dados['razao_social']; ?></option> <?php } ?>
</select>
</div>