Jump to content

Really random problem


Kingy

Recommended Posts

I have a user system using sessions, and i have user levels as well. eg: level 1 = admin and level 0 = member.

 

Upon entering an admin page (eg admin.php) i include a file called check.php

 

<?php

if(!isset($_SESSION['email'])) {
  echo "You must be logged in to view this page<BR />";
  echo "Redirecting...";
  echo "<meta http-equiv='refresh' content='3;url=../index.php?action=login' />";
  exit();
}
if($_SESSION['level'] == 0) {
  echo "You do not have the correct privileges<BR />";
  echo "Redirecting...";
  echo "<meta http-equiv='refresh' content='3;url=../index.php' />";
  exit();
}

?>

 

it works.. or should i say worked. Now when ever i enter an admin page (as an admin) for some reason i will get logged in as a level 0 user and it will say you do not have the correct privileges.

 

I don't know if i get logged in as the other member, but i get refreshed back to the main index page and it will show me all of the users information.. This is also happening for the other admins

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.