Professional Documents
Culture Documents
Lecture 33 - PHP (Sessions)
Lecture 33 - PHP (Sessions)
Engineering
Lecture 33
Sessions and Data
Persistence in PHP
statefulness has become a common requirement
HTTP is stateless
Sessions are focused on maintaining visitor-specific state between
requests
data persistence
Introduction lightweight storage of non visitor-specific state for a period of time
at the server-side level
Session data is stored in flat files in the server’s /tmp directory by
default
Using Session
Tracking
Redirecting
Using PHP
Set session
variables
Get PHP
Session
Variable
Values
Destroy a PHP
Session
Lets Practice it!
Questions?