Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Check for two variable in Session


abushahin - 6:27 pm on Dec 24, 2011 (gmt 0)


Thanks for your reply, yes the username is set and the profile is set to a number.

this works:

session_start();
if(!isset($_SESSION['username'])){
header("location:index.php");
}
else if($_SESSION["profile"]!=2){
header("location:index.php");
}


whats the difference between above and this:

session_start();
if(!(isset ($_SESSION['username'])) && ($_SESSION["profile"]!=2)){
header("location:index.php");
}


as usual any suggestions appreciated!


Thread source:: http://www.webmasterworld.com/php/4401182.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com