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
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
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
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
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
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
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!
>>
>> 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