I'm working on a sign up/registration form in php that resubmits/retains the users input if everything doesn't validate properly. I've got text box, password input, and radio buttons all working but these drop down menus have been more trouble. The php code I used works for the text boxes but not these select/options, is there a better way to do this? I've cut out the majority of the options just to save space, but each goes from 0-11 months, 1-31 days, and 1900-2013 years respectively.
<select id="month" name="month" value="<?php
if(isset($_POST['month']))
echo htmlspecialchars($_POST['month'])?>">
<option value="default">Month</option>
<option value="0">January</option>
...
<option value="11">December</option>
</select>
<select id="formDay" name="day" value="<?php
if(isset($_POST['day']))
echo htmlspecialchars($_POST['day'])?>">
<option value="default">Day</option>
<option value="1">1</option>
...
<option value="31">31</option>
</select>
<select id="formYear" name="year" value="<?php
if(isset($_POST['year']))
echo htmlspecialchars($_POST['year'])?>">
<option value="default">Year</option>
<option value="2013">2013</option>
...
<option value="1900">1900</option>
</select>