Posted on Friday 6th June 2008 at 04:30 AM | |
Adam981 Junior Member |
I did a quick look over the tutorials and didn't see anything, unless i missed it somewheres... i'm looking for a code that will display a something like this.. if admin link link link if mod link link link if user link link link I'm sure its pretty simple but i just cant seem to get it.. :( |
Posted on Friday 6th June 2008 at 06:51 AM | |
SkillMaster Senior Member |
Code if ($user[userlevel) == 6) { echo ("Admin stuff"); } elseif ($user[userlevel] == 4) { echo ("Moderator stuff"); } elseif ($user[userlevel] == 2) { echo ("User stuff"); } else { echo ("Forbidden."); } |
Posted on Friday 6th June 2008 at 02:53 PM | |
Adam981 Junior Member |
Hmm that really doesnt work for what i want to do..i tryed it and it messes up my login... so i donnno whats wrong with it. i want it to add to my login so if a admin logs in we see all links for admin mod and user.. when mod logs in we see mod and user when user logs in we see user. |
Posted on Friday 6th June 2008 at 04:37 PM | |
DanielXP Senior Member |
PHP Code
1 2 3 4 5 6 7 8 9 10 11 12
if ($logged[userlevel) == "6") {
varible is $logged not $user |
Posted on Sunday 8th June 2008 at 03:43 PM | |
Diablosblizz Senior Member |
Wouldn't $session_start() have to be included? |
Posted on Sunday 8th June 2008 at 10:06 PM | |
SkillMaster Senior Member |
PHP Code
1 2 3 4 5 6 7 8 9 10 11 12 13
if ($logged[userlevel) == "6") {
That would work better sorry. |
Posted on Saturday 12th July 2008 at 07:20 PM | |
schorsch Active Member |
how can I add the query that if a user is not eingelog but the admins eingelogten or not! So I want to make a navigation the higher level 2 and looks and a navi the only level 1 and not eingelogte see how I do that? if ($logged[userlevel) == "6") { include ("admin_navi.php") } elseif ($logged[userlevel] == "4") { include ("mod_navi.php") } elseif ($logged[userlevel] == "2") { include ("user_navi.php") } elseif ($logged[userlevel] == "guest") { include ("guest_navi.php") } else { echo ("Forbidden."); } |
Posted on Saturday 19th July 2008 at 10:18 PM | |
schorsch Active Member |
push |