I have managed to write the code for a dynamic dropdown menu, as can be seen below.
PHP Code:
<?php
include("../../includes/db/connect.php");
$query = "SELECT * FROM `termdates`";
$result = mysql_query($query) or die(mysql_error());
$dropdown = "<select name='term'>";
while($row = mysql_fetch_assoc($result))
{
$dropdown .= "\r\n<option value='{$row['termID']}'>{$row['termText']}</option>";
}
$dropdown .= "\r\n</select>";
echo $dropdown;
mysql_close();
?>
However, depending on the value selected from the drop down menu, I need it to show the term dates for the year selected. Does any one have any suggestions?
Thank you for any help in advance.