onun
$birthDay = date("d", $alder); $birthYear = date("Y", $alder);
ben ne olduğunu bilmiyorum
İşte benim kod
//Dag
$maxDays = 31;
$birthDay = date("d", $alder);
echo '<select name="day">';
echo '<option value="">Dag</option>';
for($i=1; $i<=$maxDays; $i++)
{
echo '<option '; if($birthDay == $i){ echo 'selected="selected"'; } echo ' value="'.$i.'">'.$i.'</option>';
}
echo '</select>';
//Måned
echo '<select name="month">';
$birthMonth = date("m", $alder);
$aManeder = 12;
echo '<option value="">Måned</option>';
for($i = 1; $i <= $aManeder; $i++)
{
echo '<option '; if($birthMonth == $i) { echo 'selected="selected"'; } echo ' value="'.$i.'">'.$ManderArray[$i].'</option>';
}
echo '</select>';
//År
$startYear = date("Y");
$endYear = $startYear - 30;
$birthYear = date("Y", $alder);
echo '<select name="year">';
echo '<option value="">år</option>';
while($endYear <= $startYear)
{
echo '<option '; if($birthYear == $endYear) { echo 'selected="selected"'; } echo ' value="'.$endYear.'">'.$endYear.'</option>';
$endYear++;
}
echo '</select>';