session problem ??

Discussion in 'PHP' started by kcm4web, Nov 19, 2010.

  1. #1
    hi php gurus

    i have a problem in php session. my client has a website where he can manage the questions answer. user will buy courses and get exam. in that site a php forum is integrated. my client wants that the forum will be only visible when a user get register. i have put that forum link in the session. so when a user get register he will access the forum link. but the problem is that when a user get direct access to the forum he can manage able to get in to forum. i want if new user get direct access to the forum he will redirect to the index page of the site. forum is placed in another folder.

    pls help me
    thanks in advance
     
    kcm4web, Nov 19, 2010 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    Please show us some code, does your script start with session_start()?

    More details wil help you alot!
     
    EricBruggema, Nov 20, 2010 IP
  3. imocoder

    imocoder Member

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #3
    Each script have its own session handler coded in PHP I suppose. So each starting its own session (different session ID) so this the reason you can't transport the variable from one script to another.
    Solution is to modify the forum script session handler.
     
    imocoder, Nov 20, 2010 IP
  4. [Hex]

    [Hex] Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    check session handler
     
    [Hex], Nov 21, 2010 IP