Hi i was just wondering if anyone knew how to generate a drop down menu with sql. The section of code i have that has to be changed is
<div>
<span class="bold">Choose a lecturer:</span><br>
<?php
// note how the keyword "distinct" in the following query prevents duplicate values from being returned
$dbQuery="select distinct lecturer from p3_modules";
$dbResult=mysql_query($dbQuery,$db);
// convert this loop to generate a drop down list (3a)
// the value of each <option> element should be the lecturer's name
// enclose the drop down list in a form with action=showModules.php
while ($dbRow=mysql_fetch_array($dbResult)) {
$thisLecturer=$dbRow["lecturer"];
echo "$thisLecturer<br>";
}
// add a submit button for the form
?>
</div>