In this solution to the challenge assignment, Kevin demonstrates how to store messages in the session file before a page redirect so that the message can be retrieved after the redirect to let the user know the results of the previous operation.
(gentle music)…- [Instructor] In this movie,…I'll show you how I solved the challenge assignment…and added status messages to our application.…Let's begin by looking at it in action…to see what it looks like.…So, if you weren't clear on exactly what it looks like,…here's the way I decided to do it.…So, I went to subjects.…Now, I could create a new subject,…but, instead, I'm just going to edit a subject for now.…I'm going to click on commercial,…I'll click edit, and I can change its visibility…or whatever, or I could just click edit,…it doesn't really matter.…
The main thing is to actually edit the data…in the database by clicking edit.…And as a result you see it redirected me to the show page,…and I get a message here that says…the subject was updated successfully.…Alright, let's take a look, see how we do that.…So, the first thing I did was I went in to subjects,…and I went to new.php and I said alright,…let's find the spot where the new record is created,…right, that's here, insert_subject,…and if it is created successfully,…
- Creating a content management system
- Building dynamic content navigation
- Using context and function options for conditional behavior
- Hiding content from the public view
- Insecure direct object reference
- Allowing HTML in dynamic content
- Previewing content in the public context
- Working with cookies and sessions
- Storing status messages in the session
- Secure user authentication (login/logout)
- Regulating page access
- Nesting related resources
- Managing an ordered list automatically
Skill Level Beginner
1. Create a Content Management System
2. Build Dynamic Content Navigation
3. Use Context and Options
4. Cookies and Sessions
5. Regulate Page Access
6. Nesting Related Resources
Next steps1m 15s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.