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
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 the "[]" to refer to the elements.  However, if I understand you suggestion, which works

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

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

2001-09-14 Thread Richard Baskett
I didn't take the time to read your code too thoroughly, but remember to have your select name to be anything with "[]" at the end of it, from the look of your name field you have something inside the [], you need to get rid of the rec_pd4 and just call it "x[]" or whatever you would like to call

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