Chapter 11. Adding Password Protection to Administrative Links

One of the last things you need to add before you can call your blog "web-ready" is to hide the administrative links from users who aren't authorized to view them. In this chapter, you'll learn how to build a system that lets you create administrators and require them to log in with a password before they can create, edit, and delete entries on the blog.

Creating this system requires that you master the following tasks:

  • Adding an admin table to the simple_blog database

  • Building a function to place administrators in the admin table

  • Using sessions to hide controls from unauthorized users

  • Creating a login form that allows administrators to log in to the blog

  • Writing code to check submitted ...

Get PHP for Absolute Beginners 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.