session - I keep log out every time I include php -


i'm using http://www.php-login.net/ minimal user management system. when use $_get include php page, logged out. doesn't happen when log in on development machine. when tried on different computer, logged out. how can find out what's causing this?

im guessing session?

some part of index.php

require_once("db/configure.php");  require_once("classes/login.php");  include_once("analyticstracking.php");         if ($login->isuserloggedin() == true) {          include("inc/user.php");      } else {          include("inc/nonuser.php");     } 

my user.php

<?                $pagearray = [      'home' => 'views/home.php',      'setting' => 'views/setting.php',      'article' => 'views/article.php'  ];   if(isset($_get['page'])){      $page = $_get['page'];  }else{      $page = null;  }  if($page && isset($pagearray[$page]) && $_session['user_id'] > 0){      include $pagearray[$page];  }else{      include "views/home.php";  }  ?> 


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -