Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Need tutorial on creating user management system
Welcome, Guest. Please login or register.
December 03, 2008, 11:23:44 PM
11306 Posts in 1249 Topics by 499 Members
Latest Member: haulaslemycle
Experts Round Table Network  |  Serverside Technology  |  PHP  |  Need tutorial on creating user management system « previous next »
Pages: [1]
Author Topic: Need tutorial on creating user management system  (Read 183 times)
thepreacher

Offline Offline

Posts: 78


« on: January 19, 2007, 01:06:10 PM »

I need to implement a user management system where the MENU that is displayed is based ones' access level. I figure it will have to involve a database (MYSQL). Pardon me if the question is vague.

Thanks.
Logged
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #1 on: January 20, 2007, 09:43:38 AM »

well, if it doesn't use a database, it will have to use some data storage means, like flat text files, hardcoded values in the code, etc
if you use a database, it's of course nicer, if simplier. It will also be more secure than a text file (even outside of the DOC_ROOT) if you take the necessary classical precautions.

as to display a different menu based on "levels", habilitations etc of users, well it's the basis of all sites like this one or EEE.org where you registered also ;-)

it usually involves session data (to keep track of who you are after you identified yourself) and the server-side scripts (say, PHP ;-) will simply test against $_SESSION['user_level'] or the like to display different menus etc that $_SESSION['user_level'] value is set from the database after you log in. Classically, you've a "users" table with all necessary attributes (id, name, pseudo, [address?, phone? occupation?], email, user_level, preferences, why not last_login, creationDT (Datetime), why not the last place you were in the previous time (althought this could be better placed in a user cookie, as it would require either updating the users table as soon as you "move" on to the site, or detecting the closing of the site in the user's browser, a task not completely unfeasible but perhaps unnecessarily complicated)


simple, isn't it ?
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
Pages: [1]
« previous next »
    Jump to: