Getting an empty drop-down list by the following code. Trying to fetch names from the department table. Using an oracle Database...
<label for="department">Department</label>
<select class="form-control" name="deptname" id="deptname">
<option selected disabled></option>
<?php
$dbUser = "...";
$dbPass = "...";
$dbConn = "(DESCRIPTION = (ADDRESS = (PROTOCOL=TCP)(HOST=...)(PORT=1521))(CONNECT_DATA=(SID=...)))";
$conn = oci_connect($dbUser, $dbPass, $dbConn);
$sql = oci_parse($conn,"SELECT Department1.NAME FROM Department1");
oci_execute($sql, OCI_DEFAULT);
?>
<?php
while (oci_fetch($sql))
{ ?>
echo '<option value="<?php echo oci_result($sql, 'NAME')?>"></option>
<?php
}?>
</select>