Access Control PHP MySQL

Access Control PHP MySQL

 

This post will show you How to restrict User From Accessing certain  Content on your Site.

In My Previous Blog i have created the User Access Control  Table , by assigning difference numerical  value

to difference Users type refer Here

Prior to that you need to complete  the items listed Below

  1. Mamp or xampp with phpMyAdmin install into your Computer , check out here
  2.  A Sample Database created Check out Here
  3.  New User Created . Check out Here

 

At Logins.php 

 

Step 1

Prepare SQL Queries Statement to Select  accessLevel Column

 

Step 2

Save User Access Level  Value into Session Variable

Step 3

Assign Cookies

 

At Welcome.php 

At your Page , locate the specific section that you want to restrict User From accessing

Insert the Sample Code as below

Step 1

Get Cookies Value

 

Step 2

Insert User Access Level Control Script

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Comment

eleven + eighteen =