The error is gone but "echo $result['Target']; " returns blank :?
Here is the part of login.php that sets the Session
if ($result!=1) echo "Login failure!";
else
{
$_SESSION['Alias'] = $user;
header( 'Location: http://localhost/loginsuccess.php' ) ;
}
and here is where $user is set
$user = $_POST["username"];
$pass = $_POST["password"];
$login = $_GET["login"];
EDIT: After changing some lines I found that it's like the session is never set .Specifically I changed :
$_SESSION['Alias'] = $user;
to
$_SESSION['Alias'] = "test";
and then I commented the lines that have to do with the DB and changed this line:
echo "Next Target :";
echo $result['target'];
to
echo "Next Target :".$_SESSION['Alias'];
and it still returned blank.
So can someone please tell me where is the error in my session ?
Thanks in advance