From the course: PHP: Object-Oriented Programming with Databases
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Find record to update - PHP Tutorial
From the course: PHP: Object-Oriented Programming with Databases
Find record to update
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
CRUD operations5m 59s
-
Create a record9m 35s
-
(Locked)
Dynamic attribute list7m 59s
-
(Locked)
Sanitize values for database4m 40s
-
(Locked)
Find record to update8m 34s
-
(Locked)
Update a record11m 30s
-
(Locked)
HTML forms for OOP5m 38s
-
(Locked)
Validations and errors8m 22s
-
(Locked)
Delete a record7m 21s
-
(Locked)
Create inheritable code11m 12s
-
(Locked)
-
-
-