I have a little problem
birthday´s get stored as DATE in the MySQL database.
DATE is 00-00-00
and now when i make the select options, i did it with a for loop:
<?php
$month_names = array("januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december");
for ($i=1; $i<=12; $i++) {
echo "<option ";
if ($i == $month) {
echo "selected=\"selected\" ";
}
echo "value=\"$i\">", $month_names[$i-1], "</option>\n";
}
?>
This works, but gives me 1,2,3,4,5,6,7,8,9,10,11,12 as values.
I need to have it like this 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12.
How can i do this?
You need to put a condition like this: