Re: SELECT MULTIPLE form variable?

From: Date: Sat, 14 Jun 2003 20:36:32 +0000
Subject: Re: SELECT MULTIPLE form variable?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-151507@lists.php.net to get a copy of this message
Its the littlest things that kill ya.... Thanks a ton! As a side note, I definitely do NOT have the brackets on the working page - so its an undefined "feature" (or bug) that numerical-value SELECT MULTIPLE variables post as an array to PHP. Take care, and thanks again! --Noel ----- Original Message ----- From: "Leif K-Brooks" <eurleif@buyer-brokerage.com> To: "Noel Wade" <noel.wade@chironcompany.com> Cc: <php-general@lists.php.net> Sent: Saturday, June 14, 2003 1:26 PM Subject: Re: [PHP] SELECT MULTIPLE form variable? > You need to name it formfield[], not formfield. > > Noel Wade wrote: > > >Hi all, > > > >So I was under the impression that an HTML form "SELECT MULTIPLE" item would > >return an array with all of the selected items. This array can then be used > >with any of the standard PHP array functions, yes? > > > >I have 1 HTML page that seems to work fine... However, another page that is > >nearly identical is failing - giving me the following error: "Wrong > >datatype for second argument in call to in_array". When I look at the > >variable, it seems to ONLY contain a string - the first item the user > >selected. > > > >The only difference I can see is that the working SELECT MULTIPLE has > >numerical values, and the dysfunctional one uses string values - but the > >values ARE enclosed in quotation-marks... so I don't know why they're not > >POSTing properly as an array. Is this a known bug or issue? Any thoughts > >or solutions? > > > >Thanks a bunch, take care, > > > >--Noel > > > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > >

« previous php.general (#151507) next »