RE: [PHP] select case **

From: Date: Thu, 28 Sep 2000 01:45:01 +0000
Subject: RE: [PHP] select case **
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17838@lists.php.net to get a copy of this message
On Thu, 28 Sep 2000, Curtis Cole wrote: > Did you mean remove "<?end select?>" , if so it still doesn't work. Yes I did - but I don't understand what you mean by 'didn't work'. Syntax error? Wrong result? Your computer exploded? As I said, with the changes I mentioned it worked for me. I don't see any changes at the URL you gave? > > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- 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 (#17838) next »