Learn how to enable a staff area login page that will call PHP's password_verify function to determine if an attempted password matches an admin's stored hashed password.
[Instructor] We learned how to create new admins…in our database and how to hash their password…while we were creating them.…We also learned in the last movie with validations…how to look up a user by their username.…So we're ready to start the process…of building a login form.…The idea is that the user would submit their username…and password, will find that user by the username,…and then verify that the password is correct.…The way that we verify passwords are correct…is with a handy peach p function called…password underscore verify,…and it makes it really simple because we just pass in…the new password that's being tried,…and match it with the hashed or encrypted password…that's stored in the database.…
And php will handle all the work behind the scenes…to see if they match or not, and it will return a boolean:…true or false.…Now it doesn't actually decrypt…the hashed password during this process.…What it does is it encrypts the new password…using the same algorithm, and if it's the same password…going through the same algorithm,…
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.