Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:34

User Level Access.......

Poster: G2F
Dated: Tuesday April 22 2003 - 21:06:48 BST

I have a php website and i was wondering if it is possible to to create a menu that displays different links depending what user level you have.

I.E. Admin, Registered User, Non-Registered user.

If so please can someone tell me how i would do this.

Tnx in advance,


P.S. Please can you put it in dumbass terms as I am not very good at coding. :roll: Tnx Again.

Poster: kevin3442
Dated: Saturday April 26 2003 - 8:03:15 BST


The good news: It is possible. Two general options: (1) Generate the menus dynamically, using server-side scripting, like php. (2) Store the current user's access level locally -- e.g., in a variable within a hidden frame, in a cookie (bad if cookies are diabled), or in a parameter passed from page to page -- and use conditional tests in the menu_array.js code to generate the different menu versions at runtime.

The bad news: Either approach will require a good working knowledge of the scripting language (php or js), so you may find it a bit difficult if you're a beginning scripter.


Poster: jvaska
Dated: Sunday July 6 2003 - 17:35:20 BST

no, it can be easier than that...

set user levels in the user info table...0,1,2...

set the user levels in the menu and/or page settings in the db (create extra fields for these)...

then, when you are looping out your data just call up an if statement...something like...

if $row_user['user234']' >= $row_menu['menu1'] then ... loop out your info...

if user is level 0 and the data is level 1...they don't get it...if they are level 1 or 2 or more though...yep, they can have it...

this is what i've done for something's not sessions or cookies, but it does the can also restrict the various functions they have access to - like maybe a delete button or whatever...

good luck...jv

(i'm assuming you have some kind of login thing going on there)