From the course: PHP: Object-Oriented Programming with Databases
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Session messages - PHP Tutorial
From the course: PHP: Object-Oriented Programming with Databases
Session messages
- [Instructor] In this movie, we'll look at how we can improve our session class by allowing it to manage our session messages. When I talk about session messages, what I'm referring to is the fact that in some of our pages like edit.php, once we have successfully updated one of these records, we have session message equals the admin was updated successfully. And then we want to display that on future pages as well. So the way that we do that is with the staff header, we need to have something here that says display_session_messages and that will tell us those reports of whether or not something has been added to the session. We have this function already existing, display_session_message exists inside our status and error functions. And if we scroll down here, you'll see what it does. It calls get_and_clear_session_message. If it's set, then it displays some HTML with the message inside of it. Get and clear it both finds out if it's there, retrieves it, and unsets it from the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Admin class7m 40s
-
Hashing passwords7m
-
(Locked)
Admin validations7m 16s
-
(Locked)
Find by username5m 55s
-
(Locked)
Verify password5m 5s
-
(Locked)
Define a session class8m 34s
-
(Locked)
Add page access control4m 52s
-
(Locked)
Improve the session class7m 39s
-
(Locked)
Session messages6m 40s
-
(Locked)
-
-