Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Sessions without cookies


Message #1 by Christopher Scollo <scollo@y...> on Mon, 6 Nov 2000 06:18:40 -0800 (PST)
That code sounds nice.  Is it in The Book or online?

The problem I was having is that the SID constant doesn't really work on
my system, but it did work once this morning, which is all i needed.
"?PHPSESSID=".session_id()" will pass the session id on the querystring
in a way that php will recognize.  E.g., this works:

if ($pwrd!=$GeoPassword_session) {
   sprayOptions ("Sorry, incorrect password."); // Offer user retry,
register, reminder, etc.
   } else { // Roll out the red carpet.
   header("Location: "."userpage.php?PHPSESSID=".session_id());
   //SessionID/sid/SID/session=" . session_id() all didn't work when
cookie send was disabled in the browser 11/3/00.
   //header("Location: "."userpage.php");  // All that's nec when cookies
are on.
  exit;
}

George Herson

Christopher Scollo wrote:

> Hi George,
>
> I use the querystring to pass the SessionID without
> cookies.  Before each script executes I create the
> Session object passing the SessionID.  My Session
> class has a constructor method that automatically
> checks whether it is a valid and active session in the
> database and establishes the user information for that
> session.
>
> Where are you running into trouble?
>
> -- Christopher
>


  Return to Index