SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Watertown
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $_SESSION Data Inheritance

    I am working on making an administration panel, with a part of that being a To Do manager. I have a page which lists the entries, when you click on an entry it opens in a pop-up window with more details about that entry. The problem with this, is to deny people from viewing the popup page directly.

    So I created a function which checks to see if the user is logged in, by comparing a $_SESSION value against a value in the database. The problem is, the $_SESSION data isn't being transfered from the entry list page, to the entry details popup page. Is there a way to solve this?

  2. #2
    SitePoint Guru gavwvin's Avatar
    Join Date
    Nov 2004
    Location
    Cornwall, UK
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure you have session_start() at the beginning of the popup page?

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Watertown
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gavwvin
    Are you sure you have session_start() at the beginning of the popup page?
    Well, your post made me look again. I did have it on the page, but it was after the class initialization which set the variable needed. I moved it above that line of code, and it works now. Thanks

  4. #4
    SitePoint Zealot mike.fro's Avatar
    Join Date
    Jun 2005
    Location
    Lewisville, Texas
    Posts
    130
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MikeWasHere05
    Well, your post made me look again. I did have it on the page, but it was after the class initialization which set the variable needed. I moved it above that line of code, and it works now. Thanks
    Yep that'd do it!
    Michael John Froseth
    Freelance Web Developer | MichaelFroseth | dotCom


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
  •