SMGames
07-01-2007, 12:06 PM
Hi, i am having a problem with trying to show the admin panel when i login. This is the code so far:
<?php
if(@$_SESSION['Loggedin'] == 'true')
{require'logged_in_options.php';}
else
{@$_SESSION['Loggedin'] = 'false';
?>
--The Login Box Is Here--
<?php } ?>
<?php
if ($_SESSION['Loggedin'] == 'usernamehere'){
$_SESSION['admin'] = 'true';}
else{$_SESSION['admin'] = 'false';}
if ($_SESSION['admin'] == 'true'){
require 'admin_panel.php';}
?>
The problem is, is that it still shows the admin panel for all users, can anyone spot the problem, please let me no. Thanks for your replies.
<?php
if(@$_SESSION['Loggedin'] == 'true')
{require'logged_in_options.php';}
else
{@$_SESSION['Loggedin'] = 'false';
?>
--The Login Box Is Here--
<?php } ?>
<?php
if ($_SESSION['Loggedin'] == 'usernamehere'){
$_SESSION['admin'] = 'true';}
else{$_SESSION['admin'] = 'false';}
if ($_SESSION['admin'] == 'true'){
require 'admin_panel.php';}
?>
The problem is, is that it still shows the admin panel for all users, can anyone spot the problem, please let me no. Thanks for your replies.