The entire code is only 3 pages.
password.php:
CODE
<?php
$rightuser = "";
$rightpass = "";
include ('getpassword.php');
if $_POST['user'] !== $rightuser
{ if $rightuser == ''
{
?>The username is incorrect. It should be blank.<?php ;
}
else
{
?>The username is incorrect. It should be .<?php ;
}
}
else
{ if $_POST['pass'] !== $rightpass
{ if $rightpass == ''
{
?>The password is incorrect. It should be blank.<?php ;
}
else
{
?>The password is incorrect. It should be<?php echo $rightpass;
}
}
else
{ ?>The password is correct.'; }<?php
}
?>
$rightuser = "";
$rightpass = "";
include ('getpassword.php');
if $_POST['user'] !== $rightuser
{ if $rightuser == ''
{
?>The username is incorrect. It should be blank.<?php ;
}
else
{
?>The username is incorrect. It should be .<?php ;
}
}
else
{ if $_POST['pass'] !== $rightpass
{ if $rightpass == ''
{
?>The password is incorrect. It should be blank.<?php ;
}
else
{
?>The password is incorrect. It should be<?php echo $rightpass;
}
}
else
{ ?>The password is correct.'; }<?php
}
?>
getpassword.php:
CODE
<?php
$rightuser = "";
$rightpass = "1234567890";
?>
$rightuser = "";
$rightpass = "1234567890";
?>
password.html:
CODE
<html>
<head>
</head>
<body>
<form action="password.php">
<p>Username: <input type="text" name="user" /></p>
<p>Password: <input type="text" name="pass" /></p>
<p><input type="submit" value="Submit" /></p>
</form>
</body>
<head>
</head>
<body>
<form action="password.php">
<p>Username: <input type="text" name="user" /></p>
<p>Password: <input type="text" name="pass" /></p>
<p><input type="submit" value="Submit" /></p>
</form>
</body>
What am I doing wrong? Help is greatly appreciated...


