Re: session id changing all the time on some pc's
| From: | Torsten Roehr | Date: | Fri, 02 Jul 2004 19:36:06 +0000 |
| Subject: | Re: session id changing all the time on some pc's | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189576@lists.php.net to get a copy of this message | ||
"Matthew Sims" <matt@killermookie.org> wrote in message
news:50644.208.44.135.18.1088796771.squirrel@208.44.135.18...
> > "Matthew Sims" <matt@killermookie.org> wrote in message
> >
> > news:50583.208.44.135.18.1088794835.squirrel@208.44.135.18...
> >>
> >> >> Instead of passing the session_id through the URL ($_GET) just
assign
> > it
> >> >> to $_SESSION and pass that around. Then it'll stay transparent to
the
> >> >> user.
> >> >
> >> > Could you describe the last paragraph a bit more in detail? Thanks in
> >> > advance!
> >> >
> >> > Torsten
> >>
> >> What if you used this?
> >>
> >> session_start();
> >> $_SESSION['sid']=session_id($HTTP_GET_VARS['sid']);
> >>
> >> Now as long as each of your pages has session_start() at the top, you
> >> can
> >> use $_SESSION['sid'] whereever.
> >>
> >> To the mailing list: Am I doing this correctly?
> >
> > But somehow you have to pass the session id from page to page!?!
> >
> > By the way, the session id is always available as the constant SID.
> >
> > Torsten
>
> The $_SESSION['sid'] will follow from page to page. As long as the user
> stays in the current session, all $_SESSION variables will follow from
> page to page as long as session_start() is used.
OK, but HOW do you manage that the user stays in the current session.
Usually this is made sure by passing the session id around. But obviously
you are not doing this, are you?
Torsten