Hi
I need to show dropdownmenu for month and year and current month and year are checked.
I knew how to get the current system year and month with
<? $t=getdate();?><? echo $t["year"];?>-<? echo $t["mon"];?>
Q.1 I created a dropdownmenu, but how should I make the checked value to be <? echo $t["mon"];?> ?
Please choose month:
<select name="month" class="pulldownmenu">
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
Q.2 I need to display the checked value of current year too, and the dropdownmenu needs to show current year - 10 and +10, i.e. 1998 to 2018.
How can I do it with <? echo $t["year"];?>
Please choose year:
<select name="year" class="pulldownmenu">
<option value="2008">2008</option>
</select>
Thanks for help