oracle10g - PHP Drop Down List Populated By Oracle Database Rows -
i'm getting empty drop down list while trying populate values oracle 10g website.
the drop down list appears, there no values inside of it. have error reporting on, not getting errors.
can point out error?
<tr> <td>unit list</td> <td> <select name="unit"> <?php $conn = oci_connect("user", "password", "db"); $sql = 'select organization_name organization@something'; $stid = oci_parse($conn, $sql); while ($row = oci_fetch_array($stid, oci_return_nulls+oci_assoc)) { echo "<option value=\"unit1\">" . $row['organization_name'] . "</option>"; } ?> </select> </td> </tr>
you're not executing query, after parsing query need execute before fetching results, function need oci_execute()
, used this:
$success = oci_execute($stid)
Comments
Post a Comment