i am quite new to the world of php and the world of programming in general.
i have been working with php for the last couple of days trying to creat a login page which works now, but the page i'm directing it to keeps saying that i dont have access to it. please help.
here is the code
<?php
session_start();
$SESSION['username']=$POST['user'];
$SESSION['userpass']=$POST['pass'];
$_SESSION['authuser']=0;
if (($_SESSION['username']== 'Joe') AND
($_SESSION['userpass']== '12345'))
{
$_SESSION['authuser']=1;
}
else
{
echo "Sorry, you dont have permission to view this page!";
exit();
}
?>
<html>
<head>
<title>Find my Favorite Movie!</title>
</head>
<body>
<?php
$myfavmovie=urlencode("Life of Brian");
echo "<a href='http://localhost/moviesite.php?favmovie=$myfavmovie'>";
echo "Click here to see information about my favorite movie!";
echo "</a>";
?>
</body>
</html>
as you can see it isnt very long, but for the life of me i cant figure out wy i still get the "sorry, you dont have permission to view this page!" line.