Jump to content

[SOLVED] small problem


LOUDMOUTH

Recommended Posts

I want to make this code so admin 1 and admin 2 can view this area.

right now it is set to only display for admin 2 category. 

 

Can someone help me make it so that admin 1 and 2 can view it but not admin 0.

 

if ($user_class->admin != 2) {
  echo Message("You are not authorized to be here. YOU MOTHERFUCKER");
  include 'footer.php';
  die();
}

 

I can provide more info if needed, thanks in advance!

Link to comment
Share on other sites

<?php

if($user_class > 2){
echo Message("You are not authorized to be here. YOU MOTHERFUCKER");
  include 'footer.php';
  die();
}

 

or

<?php
if($user_class < 1){
echo Message("You are not authorized to be here. YOU MOTHERFUCKER");
  include 'footer.php';
  die();

 

depending on the number of the class of a normal user is

Link to comment
Share on other sites

 

Thanks guys  I have too many categories of staff to use the  > or < dadamssg.

 

This works perfect though, thank you both, dadamssg. and rhodesa!

 

if ($user_class->admin != 1 && $user_class->admin != 2) {
  echo Message("You are not authorized to be here. YOU MOTHERFUCKER");
  include 'footer.php';
  die();
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.