This code demostrates an easy way to maintain sessions and security (or authorization) in PHP. It does NOT use the PHP built in session support.
The following method will allow you to easily secure any PHP page by simply including a file at the top of every page. In this tutorial you will:
a) Create your database structure
b) Create a login page
c) Create your security check include file
d) Secure your site
There are many different ways you can modify this technique to suit your own needs. Some of these ides will be listed at the end of this article.