I am currently working on an access validation script which sets up a session when the user successfully logs on ie
//I will ultimately be validating usernames and password
//from a text file just keeping it simple at the moment to
//get everything working.
If($_POST[uname]=="ABC"{
session_start();
$_SESSION[members] = $_POST[uname];
Header("locationrotected.php"
} else{
Header("location:login.php"
}
The question is as follows when I do a
print($_SESSION[members])
from the prtected page I get the following result
ABC1
Where does the 1 come from and how do I prevent it from displaying and can I attach additional data to the $_SESSION[members] variable ie the users full name as well as username or should i create a second session variable
//I will ultimately be validating usernames and password
//from a text file just keeping it simple at the moment to
//get everything working.
If($_POST[uname]=="ABC"{
session_start();
$_SESSION[members] = $_POST[uname];
Header("locationrotected.php"
} else{
Header("location:login.php"
}
The question is as follows when I do a
print($_SESSION[members])
from the prtected page I get the following result
ABC1
Where does the 1 come from and how do I prevent it from displaying and can I attach additional data to the $_SESSION[members] variable ie the users full name as well as username or should i create a second session variable