Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Display data from one array in another array within a table

    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.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,919
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    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.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,189
    Thanks
    75
    Thanked 4,341 Times in 4,307 Posts
    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".
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •