I am working on a form with php generated values. What I have right now is as follows:
<tr>
<td><p>ENTRY TERM: <select name="entry_term" >
<option value="">Choose One:</option>
<?php
$year=date("Y");
for ($y=0;$y<5;$y++) {
echo '<option value="Fall '.($year+$y).'">Fall '.($year+$y).'</option>';
echo '<option value="Spring '.($year+$y+1).'">Spring '.($year+$y+1).'</option>';
}
?>
</select>
</p></td>
This currently generates a list of :
Fall 2014
Spring 2015
Fall 2015
Spring 2016
Fall 2016
...etc for next 5 years
What I need to do is have this time sensitive to exclude once a specific month has passed. For example once August 2014 has started "Fall 2014" should be excluded... or when Jan 2015 has started "Spring 2015" should be excluded.
Can someone help me solve this as I am unsure of how to move forward with this.
Thanks,