June 2017
Intermediate to advanced
536 pages
9h 49m
English
Sessions are an interesting mechanism in PHP, allowing us to maintain state in what is overall a stateless communication. We might visualize them as a per-user serialized array of information saved to a file. We use them to store user-specific information across various pages. By default, sessions rely on cookies, although, they can be configured to use the SID parameter in a browser.
The cookie version of the PHP session works roughly as follows: