PHP – Creating Effective User Access

This tutorial requires that several basic sets of knowledge be known by the user already. One is you must be proficient with HTML/XHTML, two is that you already know some basic PHP programming in an object-oriented fasion and three that you know how to connect to a MySQL database using PHP. Why are these required? Becuase this tutorial is not about teaching PHP basics, nor is it about how to connect to a MySQL database. It is not about teaching you HTML/XHTML nor is it about object-oriented program development.

There are several items that you need to figure out before we can continue with our discussion of user access. These items will determine how you implement the user access control. I have listed them below:

  • Do all pages on the site need to have user authentication, or only a subset of them?
  • Will the site use SSL connections or just basic plain text authentication?
  • Will the site offer to “remember” users after the leave the site and come back or automatically log them out when they leave the site or follow the logout button/link?
  • Will the site offer content only to those logged in, such as a user control panel where the user may add/change/remove their information or a special section that is dependent upon their access level?

Once those questions are answered, you will find that the tutorials step through first generating the user database that is universal to cover all those needs and more, then we will setup basic authentication using an SSL encrypted page, then we will setup sessions, session time limits, cookies for user rememberance and finally discuss restricting access to pages via user login authorization level.

This is the overview of a several part series that will be posted over the coming days.

Comments are closed.