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 form data and display its controls if valid

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.57.126