Here is a simple PHP/MySQL authentication script (class) that is secure and easy to use. The class features: Login form Password recovery with basic email injection protection Optional md5 password encryption MySQL logon table creation MySQL injection protection Page password protection.