PHP5 Include Doesn't Work?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #16
    Heya, LB.

    I'm not sure I understand. Where do you set $_SESSION['userID']?

    Comment

    • LacrosseB0ss
      New Member
      • Oct 2006
      • 112

      #17
      $_SESSION['userID'] is set with an XML node called <ID>. The user is asked for their name and password which are saved in the XML file and if they match for a given <member> the <ID> node is returned. This is saved in $_SESSION['userID'] to symbolize the user who is logged in.

      On the next page, another XML file is loaded which contains all the user's information. So I am trying to load "filepath/" & $_SESSION['userID'] & ".xml" where the info is stored.

      $_SESSION['userID'] is being saved correctly on the first page. AND when the correct value is passed across, the 2nd page displays the user info correctly as well. (I tested this with passing through URL as opposed to sessions).

      However when the site switches to the 2nd page (with sessions working), $_SESSION['userID'] reverts back to the value it is initialized to (-1). I've exhausted every Google and Yahoo article on why this could be the problem.

      Sorry the description hasn't been so good before. Hopefully this helps. Thanks again.
      - LB

      Comment

      Working...