Here's a simplified version of how I do it in PHP
<select name="birthday_month" id="birthday_month">
    <option value=""></option>
    <? foreach(range(1,12) as $month): ?>
    <option value="<?= $month ?>"><?= date('F', mktime(1,1,1,$month,1,2000)) ?></option>
    <? endforeach; ?>
</select>
<select name="birthday_day" id="birthday_day">
    <option value=""></option>
    <? foreach(range(1,31) as $day): ?>
    <option value="<?= $day ?>"><?= $day ?></option>
    <? endforeach; ?>
</select>
<select name="birthday_year" id="birthday_year">
    <option value=""></option>
    <? foreach(range(date('Y'),1900) as $year): ?>
    <option value="<?= $year ?>"><?= $year ?></option>
    <? endforeach; ?>
</select>
You can create functions that output them if you are going to be using them a lot.
Edit: I don't take the time to autopopulate the days because the date should still be checked server side.