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

  • Home
  • SEARCH
  • 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 7867837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:48:44+00:00 2026-06-03T00:48:44+00:00

I have everything working on my login except for the admin user. When I

  • 0

I have everything working on my login except for the admin user.

When I try to navigate to my admin.php I get “Must be logged in” even if I am already logged in as an admin.

When I click the admin link, I first go to checkAdmin.php which is the code below.

<?php
if($_SESSION['userEmail'] != 'admin@hotmail.com') {
    echo "<center><font face='Verdana' size='2' color=red>Must be logged in</font> <br><a href=index.php>Login Here</a></center>";
    exit;
}
?>

Am I doing something wrong on this?
Thanks.

I have session_start(); at the top of my admin.php page.
I used print_r($_SESSION); and got this line, so it has the right value.

Array ( [userEmail] => admin@hotmail.com ) 

Also, if I add session_start(); to the checkAdmin.php then the screen just sits at checkAdmin, when I click to go to the admin page.

The admin.php has this at the top

session_start();
require "checkAdmin.php";
include("db_info.php");
  • 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-03T00:48:47+00:00Added an answer on June 3, 2026 at 12:48 am

    Make sure you have called session_start() before checking session variables.

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

Sidebar

Related Questions

everything is working fine with my jqgrid except a small issue. i have defined
I have a dynamic php (Yii framework based) site. User has to login to
I have wrote a custom MultipleChoiceField. I have everything working ok but when I
I am currently implementing a ListView populated with CheckedTextViews and have everything working just
people. I have slight problem with GD2 text on image. I have everything working
I'm following the Django-CMS introductory tutorial and have got everything working up to the
I am working on a sample map kit app for iOS. I have everything
I have a IUSearchBar with an UISearchDisplayController, and everything is working well: When I
I have an asp:FormView control bound to a datasource. Everything is working fine. If
I have a bunch of self-hosted WCF services. Everything's working fine but I'm look

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.