Home > Archive > PHP Programming > May 2004 > PHP SESSION
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| karolina 2004-05-18, 5:31 pm |
| 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
| |
|
| On 18 May 2004 13:29:17 -0700, karolina <rallykarro@hotmail.com> wrote:
> 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
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?
|
|
|
|
|