Re: case statement **

From: Date: Mon, 18 Sep 2000 19:39:19 +0000
Subject: Re: case statement **
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17181@lists.php.net to get a copy of this message
switch($state) { case "Add": add_users(); break; case "Edit": edit_users(); break; case "Delete": delete_users(); break; default: main_menu(); } ?> Note the break; ranman@nbnet.nb.ca #PHP IRC EfNet #LinuxSupport IRC EfNet http://www.LinuxGuruz.org On Mon, 18 Sep 2000, Curtis Cole wrote: > why does this code display the results of every case until one is posted by > the form??? > > <HTML> > <HEAD> > > <TITLE>Select Case</TITLE> > </HEAD> > <BODY> > > <P>&nbsp;</P> > > <? selext case action ?> > > <? case 1?> > <b>action is 1</b> > <? case 2?> > <b>action is 2</b> > <? case 3?> > <b>action is 3</b> > <? case else ?> > > > <form action="casetest.php" method="POST"> > <select name="action"> > <option>1</option> > <option>2</option> > <option>3</option> > </select> > > <input type="Submit" name="s1" value="submit"> > </form> > > <? end select ?> > > > </BODY> > </HTML> > > Curtis Cole > Programmer/Web Dev. > curtis@stcmail.com > http://www.stcinc1.com > 800-933-4504 > Fax: 334-666-8833 > > > -- > 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 >

« previous php.general (#17181) next »