Choosing a date of birth. How to implement?

I just can’t find how to implement three select boxes of the date of birth, or rather generate data in them. Please help.


Answer 1, authority 100%

<?php
// 
echo "<select name='sel_date'>";
$i = 1;
while ($i <= 31) {
    echo "<option value='" . $i . "'>$i</option>";
    $i++;
}
echo "</select>";
// 
echo "<select name='sel_month'>";
$month = array(
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    ""
);
foreach ($month as $m) {
    echo "<option value='" . $m . "'>$m</option>";
}
echo "</select>";
// 
echo "<select name='sel_year'>";
$j = 1920;
while ($j <= 2020) {
    echo "<option value='" . $j . "'>$j</option>";
    $j++;
}
echo "</select>";
?>

Answer 2

Maybe you should use jquery calendar? Look here Datepicker.