<?
session_start();
if $_SESSION['username'] <> 'test' {
header ('Location: login.php');
exit();
}
print"You have reached the members only area";
print '<p><a href="logout.php">Click here to log out.</a></p>';
?>
was the code i turned in to check (i couldn't get it to work)
but since one can't see the actual code i used
<?
$_POST[username];
$_POST[password];
if ($username == 'test' and $password == 'test') {
print"<h1>You have reached the members only area</h1><br>";
print '<p><a href="logout.php">Click here to log out.</a></p>';
}else{
include ('login2.php');
}
?>
i used that code just to make the assignment apear to work but it does not use sessions like he wanted
He didn't check the original code to see that it didn't work he just passed me.
NOW the stupid class is over but id like to know the true way to do it.