This comprehensive 8-page online tutorial explains how to authenticate and track users with PHP. Main topics include: HTTP Authentication with PHP, Validation Against a Flat File, Authenticate Against a Database, Using Cookies, and Sessions and User Preferences.
This tutorial along with sample code explains how to make a hardcoded admin password gateway using PHP. It also covers how to use .htaccess for server side password protection.
This three-page online tutorial/article talks about managing user session and authntication using PHPLIB, a set of PHP classes designed to make is easier to develop web based PHP applications.