sessionu diğer php sayfasına aldınmı?
index.php;
$username = $_SESSION["username"];
if(!$_SESSION['username']){die("Bu Sayfayı Görme Yetkiniz Yok");}