This is a simple unsecure username and password procedure i am using. The redirect works for the first if, but the next if statement does not work. Can i only have one redirect in this code?
<html>
<head>
<title>Displaying the Inputted Information</title>
</head>
<body>
<?php
// obtaining the information from the form and displaying it
if (($txt_username == building9) && ($txt_password == li))
{
('Location: exit();
}
elseif (($txt_username != building9) && ($txt_password != li))
{
header('Location: exit();
}
elseif (($txt_username == building8) && ($txt_password == fn))
{
('Location: exit();
}
else (($txt_username != building8) && ($txt_password != fn))
{
header('Location: exit();
}
?>
</body>
</html>
<html>
<head>
<title>Displaying the Inputted Information</title>
</head>
<body>
<?php
// obtaining the information from the form and displaying it
if (($txt_username == building9) && ($txt_password == li))
{
('Location: exit();
}
elseif (($txt_username != building9) && ($txt_password != li))
{
header('Location: exit();
}
elseif (($txt_username == building8) && ($txt_password == fn))
{
('Location: exit();
}
else (($txt_username != building8) && ($txt_password != fn))
{
header('Location: exit();
}
?>
</body>
</html>