From the course: PHP with MySQL Essential Training: 2 Build a CMS

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Use navigation to select pages

Use navigation to select pages

- [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 will indicate which page we're working with that will 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…

Contents