Chapter 6. Password Protecting Sensitive Actions and Areas

Now that your app can add, edit, and remove events, you need to protect those actions by requiring users to log in before they can make any changes. You'll need to create a new table in the database and a new class in the app to make this happen; you'll also need to make a few modifications to existing files.

Building the Admin Table in the Database

To store information about users authorized to modify events, you'll need to create a new database table. This table will be called users, and it will store four pieces of information about each user: an ID, name, password hash, and email address.

To create this table, navigate to http://localhost/phpmyadmin and select the SQL tab to execute ...

Get Pro PHP and jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.