How To Pass Session Variables From One Directory To Another

Discussion in 'PHP' started by Ipodman79, Jun 15, 2014.

  1. #1
    On my local server on my computer I don't need to do anything and the session variables pass they're values from my main directory to my 'App' directory.

    However when I upload my site to my hosted server it doesn't work. How do I do this?

    Thanks
     
    Ipodman79, Jun 15, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Sessions are sessions. Since you're not providing any code, how are we supposed to know?
    How are you assigning sessions? Are sessions started in the /app/ subdirectory?
     
    PoPSiCLe, Jun 15, 2014 IP
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #3
    Bind the session to the root of your domain and it should be available everywhere (checkout the php documentation about $_SESSION)
     
    EricBruggema, Jun 19, 2014 IP