Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $user;
- global $pass;
- global $approved;
- $user = $_REQUEST["user"];
- $pass = $_REQUEST["pass"];
- if (("admin" == $user) && ("123" == $pass))
- {
- $approved = "true";
- }
- ?>
- <html>
- <head>
- <title>Paul Downing</title>
- <link href="lesson6styles.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <?php
- if ($approved == "true")
- {
- echo "<div class=\"border\">";
- echo "<h2 class=\"heading\">Thank You! You have been approved.</h2>";
- echo "<center><a href=\"next.php?approved=1098\">Continue>></a></center>";
- echo "</div>";
- }
- else
- {
- echo "<form method=\"post\" action=\"lab6-1.php\">";
- echo "<table align=center class=border>";
- echo "<tr>";
- echo "<td class=\"leftCell\">";
- echo "Username:";
- echo "</td>";
- echo "<td class=\"rightCell\">";
- echo "<input name=\"user\" type=\"text\" class=\"textField\">";
- echo "</td>";
- echo "</tr>";
- echo "<tr>";
- echo "<td class=\"leftCell\">";
- echo "Password:";
- echo "</td>";
- echo "<td class=\"rightCell\">";
- echo "<input name=\"pass\" type=\"password\" class=\"textField\">";
- echo "</td>";
- echo "</tr>";
- echo "<tr>";
- echo "<td colspan=\"2\">";
- echo "<input align=\"center\" name=\"login\" value=\"Login\" type=\"submit\">";
- echo "</td>";
- echo "</tr>";
- echo "</table>";
- echo "</form>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement