Posted 24 October 2006 - 07:30 PM
Thank you in anticipation!
Posted 24 October 2006 - 07:42 PM
Each user has, stored on his computer, a Session-ID (SID). Everytime you call session_start(), the server checks if the user has a SID yet, or not. If he doesn't have, he sets him his own diffrent SID. But if he does, he pulls out the information stored on the server according to his SID. So if for an example page1.php sets $_SESSION['a']=1, page2.php sets $_SESSION['a']=2 and page3.php prints the value of $_SESSION['a']. If user number 1 goes to page1.php and then to page3.php, the output will be "1". If user number 2 goes to page2.php and then to page3.php, the output will be "2", and it doesnt matter what pages user1 visited, because each user has it's unique SID, and that's why they have variables with diffrent values.
Read more about sessions:
and more on google- http://www.google.co...ssions tutorial
(Gone until 20 to November)
Posted 24 October 2006 - 07:44 PM
If however, one user is on page 1 and the other is on page 2, then $_SESSION['a'] will be equal to the relevant value set on the respective page for each individual user.
Posted 24 October 2006 - 07:54 PM
Better late than never:)!
Thank you very much for your pacience!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users