Hi everyone.
Probably a simple enough problem, basically I have a login page that looks something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Login Page</title>
</head>
<body>
<form action="login.php" method="post">
Username: <input type="text" id="user" />
<br />
Password: <input type="password" id="pass" />
<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>
The code for login.php is:
<?php
if ($_POST["user"]=='administrator && $_POST["pass"]=='pass1')
header( 'Location:
http://192.168.2.2/index1.html');
elseif ($_POST["user"]=='user && $_POST["pass"]=='pass2')
header( 'Location:
http://192.168.2.2/index2.html');
else
header( 'Location:
http://192.168.2.2/error.html');
?>
My problem is when I press submit I'm just left with a blank page, any help you can offer would be greatly appreciated. 😃
ps I've just noticed the missing quotes at the end of 'administrator' and 'user', would this be causing the problem?