I was also reading about sessions and i read that the old session has been depracated by $_SESSION. I've tried changing it, but i've found i've got a parse error when i request the session on the other pages. No problem with registering it though.
This is the code that gives me an error:
PHP Code:
<?php
session_start();
if(!isset($_SESSION['logged'))
{
header("location:login/main_login.htm");
}
?>
And this is the code that sets the variable on the check_login page:
PHP Code:
if($count==1)
{
// Register $myusername, $mypassword and redirect to file "login_success.php"
$_SESSION['logged'] = "yes";
header("location:login_success.php");
}
else
{
echo "Error: Wrong Username or Password";
}
Lol it probably isn't very secure.
Thanks in advanced.