Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread Michele Waldman
Fernando hit is right on the head and Elijah's post was fun. Why are we still going here? -Original Message- From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On Behalf Of Jesse Callaway Sent: Wednesday, January 28, 2009 12:15 AM To: NYPHP Talk Subject: Re: [nyphp-t

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread Jesse Callaway
On Tue, Jan 27, 2009 at 7:44 PM, Zakir Tariverdiev wrote: > OnClick=AddRow()"... are you trying to send a JavaScript array to the > server? > This is not really a PHP issue. But check out the following link, > http://www.coderanch.com/t/120794/HTML-JavaScript/sending-javascript-array-server > it m

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread Zakir Tariverdiev
OnClick=AddRow()"... are you trying to send a JavaScript array to the server? This is not really a PHP issue. But check out the following link, http://www.coderanch.com/t/120794/HTML-JavaScript/sending-javascript-array-server it might help. Also, note that your City and State are enclosed inside

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread Elijah Insua
when this form is submitted $_POST will contain $_POST['data']['test'][0] = "index 0" $_POST['data']['test'][1] = "index 1" $_POST['data']['test'][2] = "index 2" I'd suggest messing around with [] in the name attribute and looking at what you can get out of post with different combination

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread Fernando Gabrieli
suppose your input is names[] foreach ($_POST['names'] as $name) { } where $name has the value for each entry of the array php.net/foreach fernando On Tue, Jan 27, 2009 at 2:16 PM, chad qian wrote: > I am not sure how many "name","position",.."zip".I guess maybe I need > foreach.How to pro

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread chad qian
I am not sure how many "name","position",.."zip".I guess maybe I need foreach.How to program foreach here? Thanks! chad> Date: Tue, 27 Jan 2009 11:51:19 -0500> From: ar...@marnik.net> To: talk@lists.nyphp.org> Subject: Re: [nyphp-talk] How to pass array when click on "submit" ?> > or you ca

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread Artur Marnik
or you can just use: then you will get an array after the post Artur David Mintz wrote: How to program php script to pass all these above information?"name","position","city","state" and "zip" are all array. Thanks!

Re: [nyphp-talk] How to pass array when click on "submit" ?

2009-01-27 Thread David Mintz
>> >> How to program php script to pass all these above >> information?"name","position","city","state" and "zip" are all array. >> >> Thanks! >> >> chad >> >> > If city, state etc are all scalars, why do you want an array at all? And if you do want some or all of the form data wrapped into an arra