Hi
I am having problems with authenticating session. I moved this over from a different site where I was testing it and didn't change anything but now it doesn't seem to be working.
The site connects to the MySQL data base and if the info is wrong it says so. However if the info is right it takes me back to the previous page, but without the session being authenticated, and so the logged in menu doesn't appear. I am not sure what I am doing wrong.
Here is the session start code from login page if login info is correct
if($match==1)
{
$_SESSION['authenticated']==true;
$_SESSION['username']=$_POST['username'];
$_SESSION['password']=$_POST['password'];
$url = 'index.php'; // default page for
if(isset($_SESSION['url']))
{
$url = strip_tags($_SESSION['url']);
unset($_SESSION['url']);
}
And here is the part that should check to see if a user is logged in:
if(isset($_SESSION['authenticated']))
{
include 'usermenu.php';
}
else
{echo 'You are not currently logged in <br> <a href="\site/login.php\">Log In</a>'; }
Thanks for any help.