Creating Access control in PHP and MySql

When I was working for a module, I want to give access for the selected user for the selected access control for a webpage.  But how its possible for all the users for different access control.

So I have decided to go with session side for access control. Which I can handle with PHP and MYSQL side. Before starting with our code, let discuss about the access control.

Most of the website have a feature for free and premium users, where they have different access control for both users. Where free user have limited control, so they cannot have privilege as premium user.

Premium user have unlimited access where they will get quick response than the free user. Its just an example for access control in different between free and premium users.

Let’s start our code side and see how its works.  Users table to store the username, password with access control. Continue reading…