RE: [PHP] select case **

From: Date: Wed, 27 Sep 2000 01:26:01 +0000
Subject: RE: [PHP] select case **
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17639@lists.php.net to get a copy of this message
On Wed, 27 Sep 2000, Curtis Cole wrote: > this is the page with my code. > http://www.curtiscole.com/php/selectcase.php > > i should not see the following until i have hit the submit button: > "action is 1 a couple more lines of html test action is 2 some more lines of > html test 2" > > here is my code: > > > <? > select ($action) ITYM switch($action) > { > case 1: ?> > > <b>action is 1</b> > a couple more lines of html > <u>test</u> > > <? > break; > case 2:?> > > <b> action is 2</b> > some more lines of html > <u>test 2</u> > > <?case default:?> and this is just default: > > > <? > } > ?> > > <?end select?> and here you probably don't want this line above as you have already closed your {} set. > > <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> With those corrections it should work (does for me) -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#17639) next »