Re: how can php applications use session control to track multiple users?

From: Date: Fri, 23 Aug 2002 20:26:24 +0000
Subject: Re: how can php applications use session control to track multiple users?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-113853@lists.php.net to get a copy of this message
Got it, and thanks to all who responsed to my question! --Wo ----- Original Message ----- From: "Kevin Stone" <kevin@helpelf.com> To: "Wo Chang" <wchang@nist.gov>; <php-general@lists.php.net> Sent: Friday, August 23, 2002 4:11 PM Subject: Re: [PHP] how can php applications use session control to track multiple users? > There is no need. Sessions are per/computer not global to all. PHP creates > a cookie with the session id and stores it on the user's computer. When the > session data needs to be reused the cookie is read and the session id > retrieved. So what that users sees is the data from their session file and > nobody elses. This is all automatic. > -Kevin > > ----- Original Message ----- > From: "Wo Chang" <wchang@nist.gov> > To: <php-general@lists.php.net> > Sent: Friday, August 23, 2002 1:33 PM > Subject: [PHP] how can php applications use session control to track > multiple users? > > > > Dear Experts, > > > > I know you can use session_register to register varialbes, > > but how do you use sessions for multiple users? > > > > Ex. > > > > $valid_user = $username; // let's say $username has "JSmith" > > session_register("valid_user"); > > > > but if another user (SWhite) logins, then the valid_user now > > has the value of "SWhite" and the earlier user "JSmith" is > > gone. So, how do you make the sessions looks like: > > > > JSmith|s:6:"JSmith";SWhite|s:6:"SWhite"; > > > > Is this the way how people usually implment to track multiple > > users? > > > > Any hints would be greatly appreciated! > > > > --Wo > > >

« previous php.general (#113853) next »