PHP SESSION

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • karolina

    PHP SESSION

    Hi,

    I have a homepage where it is possible to register as a user. The
    registration takes place in three steps.

    The first step is user data and in the end it sets session variables
    to username and password like:

    session_start() ;
    $_SESSION['username'] = $userArr['email'];
    $_SESSION['password'] = $userArr['password'];

    After this it redirects to page 2. Page 2 checks the newly set session
    variables and shoud check them against the database. This works 8
    times out of ten but sometimes the registation fails since the session
    variables not are set in page 2 and I can't figure out why.

    Can somebody explain why this fails sometimes and sometimes not. Does
    it have anyting to do with the secutity level of the users browser
    etc. Does it have something to do with the activity on the site at the
    time?
    I tried to set my own browser security to highest(both NS and IE) but
    it works for me.

    Please give me a hint to solve this problem.

    regards,

    karolina
  • Dank

    #2
    Re: PHP SESSION

    On 18 May 2004 13:29:17 -0700, karolina <rallykarro@hot mail.com> wrote:
    [color=blue]
    > Hi,
    >
    > I have a homepage where it is possible to register as a user. The
    > registration takes place in three steps.
    >
    > The first step is user data and in the end it sets session variables
    > to username and password like:
    >
    > session_start() ;
    > $_SESSION['username'] = $userArr['email'];
    > $_SESSION['password'] = $userArr['password'];
    >
    > After this it redirects to page 2. Page 2 checks the newly set session
    > variables and shoud check them against the database. This works 8
    > times out of ten but sometimes the registation fails since the session
    > variables not are set in page 2 and I can't figure out why.
    >
    > Can somebody explain why this fails sometimes and sometimes not. Does
    > it have anyting to do with the secutity level of the users browser
    > etc. Does it have something to do with the activity on the site at the
    > time?
    > I tried to set my own browser security to highest(both NS and IE) but
    > it works for me.
    >
    > Please give me a hint to solve this problem.
    >
    > regards,
    >
    > karolina[/color]

    Sessions are dependant on cookies to keep the session alive, or URL
    passing. If cookies have been disabled on the client and your server
    doesn't cope with this by falling back on URL passing then you've got a
    potential issue there.

    However, just make sure your code it perfect before trying other options.

    HTH.

    --
    If we can't play God, who will?

    Comment

    Working...