<select id = "EMPRESA" name="EMPRESA" class="form-control">
<?php
$query = "SELECT * FROM table WHERE col = '$coordinador' ";
$result = $conn->query($query);
while($row=$result->fetch_assoc()){
?>
<option value="<?php echo isset($row['EMPRESA']) ? $row['EMPRESA'] : ''; ?>"><?php echo isset($row["EMPRESA"]) ? $row["EMPRESA"] : ''; ?></option>
<?php } ?>
</select>
</div>
</div>
from : https://stackoverflow.com/questions/32606964/want-to-show-data-in-combo-box-from-mysql-table
No hay comentarios:
Publicar un comentario