Forum Moderators: coopster
Notice: Undefined index: username in c:\program files\easyphp1-8\www\inc\auth.php on line 16
Notice: Undefined index: password in c:\program files\easyphp1-8\www\inc\auth.php on line 16
the code is as:
if($_POST){
$_SESSION['username']=$_POST["username"];
$_SESSION['password']=$_POST["password"];
}
// query for a user/pass match
$result=mysql_query("select * from login
where username='" . $_SESSION['username'] . "' and password='" . $_SESSION['password'] . "'");
// retrieve number of rows resulted
$num=mysql_num_rows($result);
// print login form and exit if failed.
if($num < 1){
echo "You are not authenticated. Please login.<br><br>
<form method=POST action=index3.php>
username: <input type=text name=\"username\">
password: <input type=password name=\"password\">
<input type=submit>
</form>";
exit;
}
?>
can anyone let me know whts the problem?