I try to create the dynamic list and want to get the selected value. But every time I
got the '2001' whatever I selected from the list. Like to hear your advice.
Thanks,
Weidong
-------------------------------------------------------------------------------------------------------------------------
/*test_option.php*/
<?php
$today=getdate();
$year=$today[year];
?>
<html>
<body>
<form action="test_option.php" method="post">
Year<SELECT NAME="year">
<OPTION VALUE="" SELECTED>
<? for ($i=0; $i<= 10;$i++) { ?>
<OPTION VALUE=<?echo $year-$i;?>><?echo $year-$i;?>
<?}?>
</SELECT>
<input type="submit">
</form>
</body>
</html>
<?php
echo $year;
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]