I have an HTML select where the drop down list is created from a SQL query.
I'm wondering how I can then save the item that the user selects into a PHP variable that I can pass on to other PHP pages.
Thanks.
<tr>
<td>DRM Staff List</td><span class="required">*</span>:<br />
<td>
<select name="unit">
<?php
$conn = oci_connect("username", "password", "url");
$sql = 'select distinct "DRM Primary" from GIS_DATA_LOAD where "DRM Primary" is not null order by "DRM Primary" asc' ;
$stid = oci_parse($conn, $sql);
$success = oci_execute($stid);
echo $success;
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS+OCI_ASSOC))
{
echo "<option value=\"unit1\">" . $row['DRM Primary'] . "</option>";
}
?>
</select>
</td>
</tr>