I need a simple authentication script, here are the details:
I do NOT need an admin interface, signup section, anything like that. This will be just a component of a larger system so I will handle the creation of usernames/passwords/authentication levels. What I need it to do is as follows:
A login form that submits the login data (username and password) and checks it against a database which contains the following fields: username, password, level, name.
I will make the entries into the database manually for now, the script does NOT need to create usernames, passwords, or authentication levels.
After checking the credentials against the database it will generate a cookie that will reside on the users system. An option to make cookie permanent (i.e. 'keep me logged in') will be available to the user on the login form.
The second part of the system will be a php file to include on every page that will check the cookie, if no cookie is present it will send the user back to the login form, if the cookie is present it will verify that the page they are on is one they are authorized to be on (i.e. the 'level' indicator in the database, if not it will boot them back to their main page.
Each 'level' designater in the database will point to a specifc main page. For now there will be three 'area designaters' user,admin,reader so when a person logs in if they are classified in the level 'user' it will direct them to the [login to view URL] page, admin to the [login to view URL] page, and reader to the [login to view URL] page. The 'level' designation is just so that I can reference on a given page if a person is logged in or not.
The 'name' field should be stored in the cookie as well, and there should be a function I can include on the pages that will display the users name which is stored in the cookie.
Hi There, My name is Brendan, I'm US based, English is my primary language, and I would love to help you with this project. I'm going to PM you my portfolio. Please let me earn you trust, I promise you won't be disappointed!