php session problem with ie6

Discussion in 'PHP' started by zoreli, May 14, 2008.

  1. #1
    Hi

    I have session problem with ie6. I have this code:

    $sessionid = session_id();
    echo $sessionid;

    if I press refresh, sessionid is changed. How can I prevent this?

    Regards, Zoreli
     
    zoreli, May 14, 2008 IP
  2. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #2
    This isn't an IE problem.

    $sessionid = session_id();

    Is creating a new session because there isn't a session before.

    Try adding session_start() before that.

    Peace,
     
    Barti1987, May 14, 2008 IP
  3. Marty_

    Marty_ Banned

    Messages:
    1,031
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    or even

    session_start();
     
    Marty_, May 14, 2008 IP
  4. zoreli

    zoreli Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Sorry for bumping this thread,but I still can't solve this

    session_start();
    $sessionid = session_id();
    echo $sessionid;

    In IE7 and FF or Opera, on refresh - sessionID is not changed.
    In IE6 the very same code, on refresh, show different number.



    Anyone can help with this?

    Thanks, Zoreli
     
    zoreli, May 18, 2008 IP