Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6787339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:21:16+00:00 2026-05-26T17:21:16+00:00

I have made a login system with 3 different classes of users. My requirement

  • 0

I have made a login system with 3 different classes of users. My requirement is that each user has a different menu (control bar).

How should I design this

  1. Using the same page by using php call

    if(user('student')='true') 
        echo "unordered list";
    else if(user('admin')=='true')
        echo "admin menu";
    
  2. By using 3 different pages for each user and restricting if a different class user tries to access it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:21:16+00:00Added an answer on May 26, 2026 at 5:21 pm

    Well I personally think that hiding links based on access level is a very weak form of security, on the other hand maintaining 3 different pages could be problematic on the long run.

    I’d say on your menu you need to do something like:

    switch userType
        case 'admin':
            include 'admin_menu.html'
            break;
        case 'student':
            include 'student_menu.html'
            break;
    

    and on each of the pages you should check that the current user has access to reach it, in case a student manages to guess the url to an admin page

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Sitecore 6, I have created a sublayout that has an asp:login control. For
I'm using PHP5 here. I have made a login system that check's the username
I have made a web application that uses master page for Login & Logout
I have a website made with CakePHP 1.3.7. This website has it's own login
I have made a login system through zend auth here is the code //
I have made a MVC application that uses the built-in ASP.NET login functions. It
We have a jquery/php/mysql system that allows a user to log in and review
I made my own login system in nodejs and I have couple question about
I have a website already running made with CakePHP, which has its own login
I have a Jframe class that has a login and password fields. When loggin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.