[nycphp-talk] Javascript and PHP arrays (Massive Redux)
Phillip Powell
phillip.powell at adnet-sys.com
Thu Jul 29 11:58:22 EDT 2004
Chris Bielanski wrote:
>Okay guys, I know we visit this every couple months. Please bear with me :)
>
>Where is a good resource (php.net and google don't seem to have answers I
>can use) for validating the form with Javascript where the form vars are
>named with square-brackets so I can handle them as an array in PHP?
>
>Everything I've tried coughs up "undefined" for the value of the form var in
>question.
>
>I'll take any and all links, examples and code snippets for the cause, and I
>apologize again that I am dumping this all-too-common question on the list
>;)
>
>
>Thanks,
>Chris Bielanski
>Web Programmer,
>International Trademark Association,
>1133 Avenue of the Americas, 33rd Floor
>New York, NY 10036
>+1 (212) 642-1745, f: +1 (212) 768-7796
>mailto:cbielanski at inta.org, www.inta.org
>INTA -- 125 Years of Excellence
>
>
>_______________________________________________
>New York PHP Talk
>Supporting AMP Technology (Apache/MySQL/PHP)
>http://lists.nyphp.org/mailman/listinfo/talk
>http://www.newyorkphp.org
>
>
>
in Javascript you would write the form element like this:
document.myForm.elements['array[]']. I've found online resources on
www.phpbuilder.com that verified this for me.
Phil
--
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107
Fax: (703) 709-7219
More information about the talk
mailing list