Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. <?php
  2. global $user;
  3. global $pass;
  4. global $approved;
  5.  
  6. $user = $_REQUEST["user"];
  7. $pass = $_REQUEST["pass"];
  8.  
  9. if (("admin" == $user) && ("123" == $pass))
  10. {
  11. $approved = "true";
  12. }
  13.  
  14. ?>
  15. <html>
  16. <head>
  17. <title>Paul Downing</title>
  18. <link href="lesson6styles.css" rel="stylesheet" type="text/css">
  19. </head>
  20. <body>
  21. <?php
  22. if ($approved == "true")
  23. {
  24. echo "<div class=\"border\">";
  25. echo "<h2 class=\"heading\">Thank You! You have been approved.</h2>";
  26. echo "<center><a href=\"next.php?approved=1098\">Continue>></a></center>";
  27. echo "</div>";
  28. }
  29. else
  30. {
  31. echo "<form method=\"post\" action=\"lab6-1.php\">";
  32. echo "<table align=center class=border>";
  33.     echo "<tr>";
  34.         echo "<td class=\"leftCell\">";
  35.         echo "Username:";
  36.         echo "</td>";
  37.         echo "<td class=\"rightCell\">";
  38.         echo "<input name=\"user\" type=\"text\" class=\"textField\">";
  39.         echo "</td>";
  40.     echo "</tr>";
  41.     echo "<tr>";
  42.         echo "<td class=\"leftCell\">";
  43.         echo "Password:";
  44.         echo "</td>";
  45.         echo "<td class=\"rightCell\">";
  46.         echo "<input name=\"pass\" type=\"password\" class=\"textField\">";
  47.         echo "</td>";
  48.     echo "</tr>";
  49.     echo "<tr>";
  50.         echo "<td colspan=\"2\">";
  51.         echo "<input align=\"center\" name=\"login\" value=\"Login\" type=\"submit\">";
  52.         echo "</td>";
  53.     echo "</tr>";
  54. echo "</table>";
  55. echo "</form>";
  56. }
  57. ?>
  58. </body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement