Page is a not externally linkable
abushahin - 5:27 pm on Dec 24, 2011 (gmt 0)
Hey guys,
I have a page that checks for two session varibles both set from the login page well one from the login check page and another to see what type of user and sets an extra session variable.
so the first one sets the username and directed to successful login page where a sql query is done and member type assigned 1 or 2.
what is wrong with this code?
session_start();
if(!(isset ($_SESSION['username'])) && ($_SESSION["profile"]!=2)){
header("location:index.php");
}
i am echoing the profile and it is being set but condition fails ie once logged in as profile type 3 i can navigate to profile type 2 without problem.
anu suggestions most appreciated.