Complex (or not so) array data form submission?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all,

I get the basics of submitting a form and organizing the $_POST data within
arrays (name[], name[key], etc). But if I wanted to submit something like
multiple addresses and have it end up organized in array form like this from
submission is this possible?

$addresses = array(
    0 => array(
        'id'             => '1',
        'address1' => '...',
        'address2' => '...',
        'city'          => '...',
        'state'        => '...',
        'zip'           => '...'
    ),
    1 => array(
        'id'             => '2',
        'address1' => '...',
        'address2' => '...',
        'city'          => '...',
        'state'        => '...',
        'zip'           => '...'
    )
);

For some reason I can't seem to come up with the right naming schema in
forms in order to get this structure.

Jamie

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux