Re: HTML <select> form element

From: Date: Fri, 12 Apr 2002 22:52:53 +0000
Subject: Re: HTML <select> form element
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92818@lists.php.net to get a copy of this message
<select name=majors[] multiple size="6"> <option value="Art">Art</option> <option value="Biology">Biology</option> <option value="Business and Economics">Business and Economics"</option> etc. etc. </select> Note the [] after majors. Now majors is an array with the selected values. -- Julio Nobrega. Tô chegando: http://www.inerciasensorial.com.br "Brian McLaughlin" <bmclaugh@georgefox.edu> wrote in message news:20020412225111.32987.qmail@pb1.pair.com... > Hi all. > > I have a tag like this on a php-generated web page. > > <select name=majors multiple size="6"> > <option value="Art">Art</option> > <option value="Biology">Biology</option> > <option value="Business and Economics">Business and > Economics"</option> > etc. > etc. > </select> > > My question is... since this is a multiple-select list, in the php script > that this form calls on a submit, how do I determine which options have been > selected? If I look at $majors, it is a string whose value is one of the > several options that were selected. > > Thanks, > > Brian > >

« previous php.general (#92818) next »