Justtechjobs.com Find a programming school near you






Online Campus Both


php-windows | 2001042

RE: [PHP-WIN] How to get the Option Value? From: Gu Weidong-a1923c (a1923c <email protected>)
Date: 04/28/01

I made one childish mistake. Sorry to bother you.

Regards,

Weidong Gu

-----Original Message-----
From: Gu Weidong-a1923c [mailto:a1923c <email protected>]
Sent: Saturday, April 28, 2001 1:55 PM
To: php-windows <email protected>
Subject: [PHP-WIN] How to get the Option Value?

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>

-- 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>