>> 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
>

As long as the user keeps his browser pointing at your site, then they'll
stay in the currect session. The moment they shut down the web browser,
the session is lost.

When the user first comes to your site, assign the session_id to a
$_SESSION variable. Then as the user jumps from page to page, check the
$_SESSION variable with the session_id on that page.

Try this, on the front page:

session_start();
$_SESSOIN['sid']=session_id();

On another page:

if ($_SESSION['sid']==session_id()) {
  continue browsing;
} else {
  redirect to front page;
}

or however you want it to be. The above isn't tested. Not sure if
session_id needs to be assigned to a variable.

Is this what you're referring to or am I just misreading what you're asking?

--Matthew Sims
--<http://killermookie.org>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to