Jump to content

Why would this work on my local machine and not on the server?


intrigue

Recommended Posts

The following works on my local machine but not on the server, it basically checks the level of the user and displays an error if they are not the required level else it shows them the page, which should then call the $dest function
i.e.
[code]checkSession("displayColor", 3)[/code]
would run the displayColor function if the user had an access level of 3 or more.
Please help!!!!

[code]function checkSession($dest, $level)
{
if (($_SESSION['access']) < $level)
{
?>
<h2>You are not authorized to view this page please login.</h2>
<?php
loginFrm();
}
else
{
$dest();
}
;
};[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.