title: Login form and accessing pages for admin/users PHP
body: <p>I created a table which has one admin and can have multiple users. When the user is logged in, he can perform CRUD operations and users can only view the data when they are logged in. BUT there is a problem because i don't know how to omit the regular user from simply entering the address in the address bar and accessing the page he is not supposed to (the page only admin has access to). Since I am new to PHP, I know I am supposed to use sessions for this, but I don't know how. What is the function I need to use, which column from the table (userid or the type - admin and user - those are the user types from the table) and where should I place the if statement in my code?</p>