PHP

Mark Musone mmusone at shatterit.com
Fri Aug 22 00:20:54 EDT 2003


Yea, definitely post the URL..i'm not sure what you got going there..

Maybe even a sample code snippet of how you are trying to access the
arrays..

Are you saying you each form is it's on dimension in the array? And each
element is the other one, for example:

$form["form1"]["field1"]
$form["form1"]["field2"]
$form["form1"]["field3"]

$form["form2"]["field1"]
$form["form2"]["field2"]

$form["form3"]["field1"]
$form["form3"]["field1"]

something like that??

If that’s the case, and then I assume you're tying to access it like
$_POST["form['form3']['field1']"] then you'll probably run into
problems..

PHP isn’t very good with directly mucking around with multiple
dimensional arrays.

The best way to access it is like this:

$mypostforms=$_POST["forms"];

then deal with $mypostforms directly ...

print $mypostforms["form3]["field1"];


or I could be way off as to what you are doing....i think more info is
needed..


-Mark


-----Original Message-----
From: owner-nflug at nflug.org [mailto:owner-nflug at nflug.org] On Behalf Of
Robert Dege
Sent: Thursday, August 21, 2003 10:52 PM
To: nflug at nflug.org
Subject: PHP


Okay,  I know there's been a lot of buzz with php as of late, so maybe
someone can help me out here.

I'm trying to pass a 2-dimensional array between 2 webpages.

The first page consists of a form with 6 fields. The webpage contains
several instances of the same form so that the user can fill out
multiple entries at once.

When the 'Submit' button is clicked, the array is passed to the next
webpage via $_POST.  However, I'm having some trouble extrapolating the
data from the array.  The data appears to be parsed by column instead of
by row.

I can provide a URL if anyone is interested.  I've set it up so that the
2nd webpage outputs a 6x6 array so that it's easier to visualize the
matrix.

Dege

So Many Things in Life Would Be Really Funny
.... If They Weren't Happening To Me

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
 





More information about the nflug mailing list