In this challenge assignment, you are asked to build a PHP page which will connect to the database, query for all records in the pages table, and then loop through the result set to output a list of pages.
- [Instructor] It's time for another challenge assignment.…Your challenge this time is to take what we've learned…in this chapter so that you're able to connect…to the database, retrieve records from the pages table,…and then use that data to make a list…of the key page attributes using PHP.…Let's go over the points you want to make sure that you hit.…The first is that you want to use the database connection…that we've already set up, and you will remember,…we assigned it to a variable in initialize dot PHP.…Review that code, make sure that you understand it…and that you know how to use it.…
Once you have that, you'll be able to query the pages table…for all records sorted by their position…so that we can generate a list of the pages.…And what's the right place for a list?…Well, that's going to be in our pages directory…inside index dot PHP.…You'll remember that we had some placeholder code…in there to begin with.…You can go ahead and remove that placeholder pages array…because we're not going to need it anymore.…
- Organizing project files
- Including and requiring files
- Working with URL parameters
- Encoding dynamic content
- Modifying headers and page redirection
- Creating forms and processing form data
- MySQL basics
- Using PHP to access database tables
- Creating, reading, updating, and deleting database records with PHP
- Validating data
- Preventing SQL injection
Skill Level Beginner
1. Start a Database-Driven Project
2. Build Web Pages with PHP
3. Headers and Redirects
4. Build Forms with PHP
5. MySQL Basics
6. Use PHP to Access MySQL
7. CRUD with PHP
8. Validate Data with PHP
9. Prevent SQL Injection
Next steps1m 8s
- 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.