Re: [PHP] Multiple selections

2002-11-13 Thread David Rice
Thanks Mike and Ernest for the info on how to handle the "var[]" Multiple Select name more sensibly in JavaScript. Not even a workaround. By definition, in JavaScript x.y is identical to x['y'], so where for a simple field you might write: document.formname.myvar.value for a field n

RE: [PHP] Multiple selections

2002-11-13 Thread Ford, Mike [LSS]
> -Original Message- > From: Ernest E Vogelsinger [mailto:ernest@;vogelsinger.at] > Sent: 13 November 2002 07:34 > To: David Rice > > I've made quite a number of JavaScripts controlled PHP > dialogs containing > the [], they all work like a charm. There's only one thing > you cannot do A

RE: [PHP] Multiple selections

2002-11-13 Thread Ford, Mike [LSS]
> -Original Message- > From: David Rice [mailto:davidrice@;rogers.com] > Sent: 13 November 2002 01:00 > > On Tuesday, November 12, 2002, at 07:34 PM, Ernest E > Vogelsinger wrote: > > > > Sure it is - just name the listbox control "myvar[]" (note the angle > > brackets). PHP will recogniz

Re: [PHP] Multiple selections

2002-11-12 Thread Ernest E Vogelsinger
At 02:06 13.11.2002, Todd Cary said: [snip] >Many thanks!! One thing I do not understand in the "types" of variables >is the use and referencing of a variable with the "[]". What I usually do >is define a variable as > >$myvar = array(); > >And then I use

Re: [PHP] Multiple selections

2002-11-12 Thread Ernest E Vogelsinger
At 01:59 13.11.2002, David Rice said: [snip] >On Tuesday, November 12, 2002, at 07:34 PM, Ernest E Vogelsinger wrote: >> >> Sure it is - just name the listbox control "myvar[]" (note the angle >> brackets). PHP will recognize this being an array, and you'll e

Re: [PHP] Multiple selections

2002-11-12 Thread Todd Cary
David - Speaking of JavaScript, is there a way to block the Enter key? If I have two buttons, the Enter key always pushes the one with focus. What is the accepted way to handle this? With one button it is nice to let the user press the Enter key and depress the one button - with two, it can

Re: [PHP] Multiple selections

2002-11-12 Thread David Rice
On Tuesday, November 12, 2002, at 07:34 PM, Ernest E Vogelsinger wrote: Sure it is - just name the listbox control "myvar[]" (note the angle brackets). PHP will recognize this being an array, and you'll end up with $myvar = array('select1','select2'); Is this the only way to do this? I jus

Re: [PHP] Multiple selections

2002-11-12 Thread Todd Cary
derstand you suggestion, which works like a champ, the use of the "[]" tells the interpreter to treat $myvar as an array. Todd Marco Tabini wrote: Sure! Just add [] to the end of the name of the field. PHP will return all the values in an array: Marco

Re: [PHP] Multiple selections

2002-11-12 Thread Marco Tabini
Sure! Just add [] to the end of the name of the field. PHP will return all the values in an array: Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! --- Begin Message -

Re: [PHP] Multiple selections

2002-11-12 Thread Ernest E Vogelsinger
At 01:37 13.11.2002, Todd Cary said: [snip] >I have a pull-down with the MULTIPLE attribute. If the Form is of Type >GET and two values are selected (e.g. select1 and select2), I see in the >URL the following: > >?myvar=select1&myvar=select2 > >"myvar" app

[PHP] Multiple selections

2002-11-12 Thread Todd Cary
I have a pull-down with the MULTIPLE attribute. If the Form is of Type GET and two values are selected (e.g. select1 and select2), I see in the URL the following: ?myvar=select1&myvar=select2 "myvar" appears twice, however, if I check the $HTTP_GET_VARS, I only have one value: myvar=select2.

Re: [PHP] multiple selections in list/menu field

2001-09-14 Thread Richard Baskett
er you would like to call it as long as the "[]" is empty :) I hope that made sense! Rick > From: Tom Beidler <[EMAIL PROTECTED]> > Date: Fri, 14 Sep 2001 17:26:50 -0700 > To: php list <[EMAIL PROTECTED]> > Subject: [PHP] multiple selections in list/menu f

[PHP] multiple selections in list/menu field

2001-09-14 Thread Tom Beidler
I'm trying to use a list/menu field with multiple options allowed but I'm only getting the very last selection. Here's part of my code to build the list/menu field; print ("\n"); print ("$option_pd4"); print (" \n"); Here's the code to build the options; $pd4arry = array(array("c1,",

Re: [PHP] Multiple Selections?

2001-05-13 Thread Sean Cazzell
> I have a Multiple Selection HTML Field --- the user can select any number of > items by holding down the CTRL key. When I submit my form to my (say) > TestProg.php -- in the Hidden Input Field I only see the value for the > *last* item I selected... how can I see all the items I selected? If y

[PHP] Multiple Selections?

2001-05-13 Thread Jason Caldwell
I have a Multiple Selection HTML Field --- the user can select any number of items by holding down the CTRL key. When I submit my form to my (say) TestProg.php -- in the Hidden Input Field I only see the value for the *last* item I selected... how can I see all the items I selected? Thanks. Jaso