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 8734565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:51:59+00:00 2026-06-13T09:51:59+00:00

On my website, I want a few options to be enabled when someone logs

  • 0

On my website, I want a few options to be enabled when someone logs in with an admin account. My question is about how to secure that admin account as much as possible. They way login is setup on my website is after authenticating login, i do this $_SESSION['status'] = 'authorized'; and then i say something like this:

<script>
$(document).ready(function(e) {
    if(<?php echo ($_SESSION['status'] == 'authorized'); ?>) {
        $('#account_window').show();
    }
});
</script>

<div id="account_window">
    //account stuff
</div>

With the addition of the master account I was thinking about adding this $_SESSION['master'] = 'authorized'; and then in the front page, I would add this code:

<script>
$(document).ready(function(e) {
    if(<?php echo ($_SESSION['status'] == 'authorized'); ?>) {
        $('#account_window').show();
    }
});
</script>

<div id="account_window">
    //account stuff
    <?php if($_SESSION['master'] == 'authorized') { ?>
        <div id="master_account">
            //admin stuff like send users emails
        </div>
    <?php } ?>
</div>

But I feel like that is too easy, is that a safe way to authenticate the master account? If not, what is the best way to go about doing that?

  • 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-06-13T09:52:01+00:00Added an answer on June 13, 2026 at 9:52 am

    It might be tempting to just “hide” the admin interface from non-admins, but that’s fundamentally bypassable if someone just injects the right HTML into the page (e.g. with a GreaseMonkey script), or generates the requests manually.

    You have to validate every action in PHP in order to get any actual security. Therefore, you need to check that the user is authorized when they submit any forms or commit an action, in PHP.

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

Sidebar

Related Questions

I have a website where I display student info. I want to add few
I have a website that I want to add Javascript to the header part
The website I'm building has a few elements that are the same on every
I'm maintaining an Intranet website for my company that they want to expose to
I want to upload files on my website. I have read at a few
We have a website for kids. We want to add few puzzles/games for kids.
I have a map on my website that I want to tie to a
I run a multiple author website. I want to restrict a few tags from
I have a free web site that streams real-time stock-options data. I want to
We're about to deploy a new Django website, and we want to use Google

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.