At the moment, I am trying to create two drop down menus that will act as time intervals. My goal is to set it up where if the user selects a year in the first drop down menu, then the next menu will automatically populate with values that are >= the first menu selection. Here is both drop down menus that gather years by querying to my database.
[php]
Please select a year
$result = $conn->query($query);
while($row = $result->fetch_object()) {
echo “”.$row->year."";
}
?>
Please select a year echo " "; <?php $query = "select distinct year from table";
$result = $conn->query($query);
while($row = $result->fetch_object()) {
echo “”.$row->year."";
}
?>
Both of these drop down menus gather years from my database. Instead, I want my year2 menu to grab only the years >= the year value that the user selects in the first drop down menu. My question is how do I go about doing this? Do I still have to create three separate files, JQuery file, function file, and this file, or, is there a simpler way to go about this? Any help would be greatly appreciated.