PHP

Robert Dege rdege at cse.Buffalo.EDU
Fri Aug 22 14:03:35 EDT 2003


Okay, Here are a few URLs:

#
# This one sorts each entry on a column basis
#
http://www.dd950.com/CURRENT/up2date-ONE.php	// The Form selection
http://www.dd950.com/CURRENT/commit2db-ONE.php	// The Form processor

http://www.dd950.com/CURRENT/up2date-ONE.phps	// View SRC
http://www.dd950.com/CURRENT/commit2db-ONE.phps	// View SRC


#
# This setup outputs each entry on a diagonal 2x array (I have no clue  why)
#
http://www.dd950.com/CURRENT/up2date-TWO.php    // The Form selection
http://www.dd950.com/CURRENT/commit2db-TWO.php  // The Form processor

http://www.dd950.com/CURRENT/up2date-TWO.phps   // View SRC
http://www.dd950.com/CURRENT/commit2db-TWO.phps // View SRC


I had these in functions, but exanded them out since I'm trying to debug
the problem.  ALso, the user/pass is no working yet, so just click submit
button to view the results.


-Rob

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



Dege

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




More information about the nflug mailing list