As per your suggestion, I changed the code to use the $_session array as follows:
Register the var if the login test was passed>
# begin session, register user name
session_start();
$_SESSION['username']=$username;
Access check include file that protects private pages:
if( isset( $_SESSION['username'] ) ) {
$logged = "<span style='text-transform:capitalize'>".$_SESSION['username']." </span>logged in";
}else{
header("Location:index.php");
}
I am still gettign the same symptom - the user is bounced to the login page. Am I not registering the session at the right place or am I just an idiot (rhetorical)?