Learn how to find an existing record in the database table and display its properties in a web form that an admin user can edit and submit to update the database data.
- [Narrator] Now that we've learned how to…create records, we're ready to move to…the next part of CRUD, which is updating.…Updating in the CMS is a two-step process.…The first thing we need to do is we need to…find a record in the database and get it's current data…and then display it for the user in a form…that they can edit.…That's similar to the process that we've had…for reading records so far.…We're going to read back a record from the database,…turn it into a PHP object, and use it to…present a form to the user.…And then, when the form is submitted with the…user's edits, we want to update the…record values that are in the database…using an object.…
So we've got to have both parts of that process.…In this movie we're going to be looking at…the first one, how we can retrieve data and…put it on a form for the user to edit.…And then in the next movie, we'll look…at how we can actually update it in the database.…So what we're going to be working on…is this edit page.…If I click on ID number five and I click edit,…
Note: This is an intermediate-level training course that assumes you have existing knowledge of PHP. To refresh your skills, check out PHP Essential Training and PHP: Object-Oriented Programming.
- Creating a project database and tables
- Connecting to the database
- Database queries with OOP
- The active record design pattern
- Defining a database-driven class
- Performing common database tasks with OOP
- Creating inheritable and reusable code
- Object-oriented user authentication
- Object-oriented pagination
Skill Level Intermediate
Consuming RESTful APIs in PHP with Guzzlewith Justin Yost2h 12m Intermediate
PHP: Accessing Databases with PDO and MySQLiwith David Powers3h 47m Intermediate
1. Overview and Project Setup
2. The Database Connection
3. Define a Database-Driven Class
4. Object-Oriented CRUD
5. Object-Oriented Authentication
6. Object-Oriented Pagination
- 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.