The earliest record I'm searching is from 4/2012 so I'd like the default selection when the page is first loaded to be that. 2012 is the first entry in option list, it's making April appear first that is the issue
Here's my current php code for two select boxes, one for month and one for year.
<form class="formtext" action="monthly_sums.php" method="get">
<p>Monthly Report<br></p>
Company:
<select class="bck1" name="company" id="company">
<?php echo $options ?>
</select><br>
Month:
<select class="bck1" name="month" id="month" onchange="" size="1">
<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>
Year:
<select class="bck1" name="year" id="year" onchange="" size="1">
<?php echo $options2 ?>
</select>
<input type="submit" class="submit" onClick="return monthlyValidation()"/>
</form>
and here's my php for the year option list:
//propagate year selection range for monthly report. from 2012 to current year
$curr_year=date("Y");
for($i=2012;$i<=$curr_year;$i++)
{
$options2 .= "<option value =\"".$i."\">".$i."</option>";
}
thanks in advance!