Re: controls "list menu"
| From: | Peter Bottenberg | Date: | Tue, 13 Aug 2002 10:35:36 +0000 |
| Subject: | Re: controls "list menu" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112293@lists.php.net to get a copy of this message | ||
Hy,
Save this script as select.php
<?PHP
if (!isset($action))
{
$action = "select";
}
if ($action == "select" )
{
?>
<form method="post" action="select.php">
<select name="select" onChange="this.form.submit()">
<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
</select>
<input type="hidden" name="action" value="display">
</form>
<?
}
if ($action == "display")
{
?>
You selected value <?=$select?>
<?
}
?>
Greetings
Peter
-------------------------------------------------
"Kale" <kaleonardo@home.ro> schreef in bericht
news:00aa01c242b2$1dc496b0$7800a8c0@leonard...
hy,
I have a list menu:
<select name="select">
<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
</select>
I want when I select value "two" my page reloads and
it prints "You selected value TWO".
How can I do this?
thx
kale.