Include the page ID in the link parameters so that PHP can locate the correct page content to display.
- [Instructor] Now that we added page content…in the last movie, we have our database data ready.…And we're ready to let the user choose different…pages of content, using our navigation.…You should already have the skills to accomplish this…from what we did in part one of this course,…that is, you want to be able to click on…one of these links and have it send…a URL parameter that'll indicate which page…we're working with.…That'll then show up up here, in the URL…and then we'll be able to grab that parameter,…go to the database and find the appropriate…page to display it here.…
Let's walk through it together.…Let's go to our code.…We want to go into the public navigation…and right here, where we're outputting the nav…page menu name, right above it we have a link.…And that link right now just goes to index.php,…it also needs to send a URL parameter.…So we're going to call it id, so id is going to be equal…to the dynamic value from nav page.…And it's just going to be id.…Now we don't want to just use that value on its own.…
- 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.