php-windows | 2001042
Date: 04/28/01
- Next message: Gu Weidong-a1923c: "RE: [PHP-WIN] How to get the Option Value?"
- Previous message: Ruslan Ohitin: "Re: [PHP-WIN] Global variable"
- Next in thread: Gu Weidong-a1923c: "RE: [PHP-WIN] How to get the Option Value?"
- Maybe reply: Gu Weidong-a1923c: "RE: [PHP-WIN] How to get the Option Value?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Gu Weidong-a1923c: "RE: [PHP-WIN] How to get the Option Value?"
- Previous message: Ruslan Ohitin: "Re: [PHP-WIN] Global variable"
- Next in thread: Gu Weidong-a1923c: "RE: [PHP-WIN] How to get the Option Value?"
- Maybe reply: Gu Weidong-a1923c: "RE: [PHP-WIN] How to get the Option Value?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

