Basic Login is a basic PHP login script that can be downloaded used and modified under the general user public license provisions. This is not a PHP login script for a government institution or fortune 500 company as it uses standard encryption and cookie based user identification that a determined hacker might exploit. It is, however, perfect for a standard website that would benefit from a basic PHP to MySQL login script that is easy to deploy and uses standard methods of restricting access and granting permissions.
After writing countless PHP login scripts using various combinations of standard components tailored to the needs of the sites for which they were designed, I got wise and distilled the elements that I used most frequently into a basic application that can be easily uploaded and deployed on any project I was working on. While there are no grand inventions happening here, Basic Login should do what you need it to do right out of the gate. Features, functions and components are as follows:
PHP to MySQL structure
Password encryption
Email forgotten password hint
Email password change/ recreation
New user account creation with error handling
User permission level control
User login routing by permission on login
Central configuration file
Administrative user management report
First user gets admin permissions
Using Basic Login is easy:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(50) NOT NULL default '',
`password` varchar(150) NOT NULL default '',
`password_hint` varchar(255) NOT NULL default '',
`lastname` varchar(50) NOT NULL default '',
`firstname` varchar(50) NOT NULL default '',
`email` varchar(100) NOT NULL default '',
`phone` varchar(50) NOT NULL default '',
`address1` varchar(100) NOT NULL default '',
`address2` varchar(100) NOT NULL default '',
`city` varchar(80) NOT NULL default '',
`state` varchar(20) NOT NULL default '',
`zip` varchar(20) NOT NULL default '',
`country` varchar(50) NOT NULL default '',
`url` varchar(125) NOT NULL default '',
`permissions` varchar(20) NOT NULL default '1',
PRIMARY KEY (`id`)
)