Hi,
to get the birthdays of users I use the following code:
Tag <select name="geb_day">
<?
$i=0; while ($i<32):
$output .= "<option";
if ($geb_day=='$i') { $output .= " selec"; $output .= "ted"; }
$output .= " value=\"$i\">$i</option>";
$i++; endwhile;
echo "$output";
?>
</select><? //echo "$geb_day=='$i'"; ?> Monat <select name="geb_month">
<?
$i=0; while ($i<13):
echo "<option value=\"$i\"";
if ($geb_month=='$i') { echo " selected"; }
echo ">$i</option>";
$i++; endwhile;
?>
</select> Jahr <select name="geb_year">
<?
$i=1900; while ($i<2004):
echo "<option value=\"$i\"";
if ($geb_day=='$i') { echo " selected"; }
echo ">$i</option>";
$i++; endwhile;
?>
</select> | <? echo "$geb_day.$geb_month.$geb_year"; ?>
In the first part I've already been experimenting with no result because the output in the select field isn't just
<option value="2" selected>... but
<option value="2" selected="selected">
I have no idea where this comes from, it's not in the code an I don't know of any php-/server-thing, that would cause such a change.
Thanks for helping.