Connecting Tech Pros Worldwide Help | Site Map

question in the same variable session

Member
 
Join Date: Jan 2009
Posts: 52
#1: Feb 8 '09
hi
I has write a script with php for login member
that after arrival member to site a variable session with name username
($_session['username'] )
is created and the other page in site is used that value is username for each user and username is unique for each user
my question is this
if several member login at one time this variable session with one name
for all users that login ,now how is this variable session with name username on the
server?is this variable unique or identify for each user?
thanks alot
stepterr's Avatar
Familiar Sight
 
Join Date: Nov 2007
Posts: 144
#2: Feb 9 '09

re: question in the same variable session


Quote:

Originally Posted by oranoos3000 View Post

hi
I has write a script with php for login member
that after arrival member to site a variable session with name username
($_session['username'] )
is created and the other page in site is used that value is username for each user and username is unique for each user
my question is this
if several member login at one time this variable session with one name
for all users that login ,now how is this variable session with name username on the
server?is this variable unique or identify for each user?
thanks alot

A session is exactly how it sounds, it keeps track of each users session on your site and is valid for that browser session. If userA logs in then for them $_session['username'] = userA . If userB logs in, $_session['username'] = userB for them. If you want to test this try logging in using Firefox with one username and then log in using a different browser under another username and you'll see how it will work.
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#3: Feb 9 '09

re: question in the same variable session


Just a note: $_SESSION needs to be written uppercase.
Member
 
Join Date: Jan 2009
Posts: 52
#4: Feb 10 '09

re: question in the same variable session


hi
meaning of your answer this is?
variable session with the same name for server is unique ?
does the server identify different user with this variable session with the same name?
thanks very much for all your trouble
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#5: Feb 10 '09

re: question in the same variable session


Each session is unique to the person browsing the website.
Reply