select case **
| From: | Curtis Cole | Date: | Mon, 25 Sep 2000 20:07:47 +0000 |
| Subject: | select case ** | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17354@lists.php.net to get a copy of this message | ||
Thanks,
all of the above code is in one file called selectcase.php, the first time
the page loads i should just see the form. the form should send the value of
action so that one case statement is excuted and the form is displayed
again. why is every case statment being executed along with the form when
the page first loads.
Curtis
<?
select ($action)
{
case 1:
?>
<b>action is 1</b>
a couple more lines of html
<u>test</u>
<?
case 2:
?>
<b> action is 2</b>
some more lines of html
<u>test 2</u>
<?
}
?>
<?end select?>
<form action="selectcase.php" method="get">
<select name="action">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<input type="Submit" name="s1" value="submit">
</form>
Curtis Cole
Programmer/Web Dev.
curtis@stcmail.com
http://www.stcinc1.com
800-933-4504
Fax: 334-666-8833