View Full Version : Display data from one array in another array within a table

11-12-2010, 12:58 PM
Hey guys,

I'm hoping this is possible or that there is an easier way to do this.
I'm having an issue with displaying data from one array that contains information about users in a table that is controlled by a different array.
Is it possible to do this or is this use of arrays to display the data the wrong approach?

The table is located on one webpage, I simply want to extract one piece of information that I have placed in the initial array as part of the login script that contains user information (for validation for login etc) and display it in a table on the new webpage that is opened as a result of successful validation of the user details.

I'm completely stumped and after many attempts I just can't seem to get it to work.

Philip M
11-12-2010, 02:04 PM
This seems to have nothing to do with arrays. You must pass the value of the variable to the second page using a session cookie.

I question the wisdom on security grounds of having user information in your web page. Why do you want to do that? Are you trying to display "Hello UserName" or something?

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

Old Pedant
11-12-2010, 09:27 PM
Seems like, in any case, this is something that should be done via server-side coding.

At least I would presume and hope that "the new webpage that is opened as a result of successful validation" is the result of *server* validation, not JavaScript coding.

So if that's true, just send the info from the first page to the server (possibly in the form of <input type=hidden> field(s)?) and then let the server dump it into the appropriate spot in the "new webpage".