Hopefully you (or someone else in the universe) can help me..
I want to create a PHP application that can authenticate users from a webpage using a database. Here is what I have in mind and what I think needs to be done..
Lets make believe (like mr. rogers) that I have a table named 'users' and this table has these fields:
name, age, sex (cool), username, password, and accesslevel (which will be a 0 or 1).
I am thinking that i want to have a default user in the database field 'username' named 'admin' and 'admin' will have an access level of 0 (zero). All other users will have an access level of 1 (so they are defined as a user and not an admin).
They will log in and username is checked against the db to make sure that user exists and then verifies the password and then if password is correct.. a session will be created for the user to start using the website.
Is THIS the way most sites are done, or do i have the wrong idea? What is a better way? What are my options?
I need an admin to make other users 'admin' if i want them to update a dynamic news piece of the site.. (in other words the admin has the power (of greyskull - forget it..its a He-Man thing) to give other users 'admin' rights via the accesslevel in the database..
Give me some good ideas dudes and dudettes!
Thanks..
-Buzzlightyear
To Infinity and Beyond..