PHP AdvancedLesson 37Free preview
PHP Sessions
This lesson is part of PHP · All levels
Summary
The session stores user data on the server, making it more secure than cookies for sensitive information. This lesson discusses session_start(), superglobal $_SESSION, and how to delete sessions. With the session, the login status can be maintained between pages.
Key points
- Session_start() should be called at the earliest to start the session
- Session data is stored on the server with the identifier sent to the browser
- $_SESSION is used to read and write session data
- Delete the stored session data
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.