intrigue Posted November 6, 2006 Share Posted November 6, 2006 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 functioni.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] Link to comment https://forums.phpfreaks.com/topic/26302-why-would-this-work-on-my-local-machine-and-not-on-the-server/ Share on other sites More sharing options...
grlayouts Posted November 6, 2006 Share Posted November 6, 2006 because the session you had on your home pc. would be diffrent from the one on another ip or server. i think.have you tried logging out and clearing you catch and cookies? Link to comment https://forums.phpfreaks.com/topic/26302-why-would-this-work-on-my-local-machine-and-not-on-the-server/#findComment-120266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.