Chapter 10. Working with User Sessions
PHP contains numerous functions for managing user sessions, which can be stored in the $_SESSION superglobal. Sessions use techniques built into the PHP language, making the act of saving state as easy as calling a function.
In this chapter, you will learn
What session variables are and how they work
How to start or resume a session
How to store variables in a session
How to destroy a session
How to unset session variables
Get Sams Teach Yourself PHP, MySQL® and Apache All in One now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.