SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    display array result on another page

    Hello

    I have two pages.

    Index.php (Contains a login form)

    Login.php (Processes the login data)

    In the Login.php page, any errors are stored in an array and displayed on that same page.
    I want to redirect the user to Index.php and display the error data on that page.
    What is the best way to do this?

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    do your form processing on index.php instead?
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi Jaynesh,

    So you have database, because you could use PHP searialize function and write it to a table in your database, then write a session variable that 'errors:1' and then test on the session, retrieve and unserialize the data and display.

    Alternatively you can post the errors to the index.php page and check if the errors post values have been set, if so display them.

    You could also write the errors to the users session although this is not intended for a large amount of data.

    Regards,
    Steve
    ictus==""


Bookmarks

Posting Permissions

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