Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php
  2. $password = "123456"; //set your own here
  3. ?>
  4.  
  5. <html>
  6. <head>
  7. <title>Login!</title>
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  9.  
  10. <style type="text/css">
  11. P { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
  12. TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
  13. </style>
  14.  
  15. </head>
  16. <body>
  17.  
  18. <?php
  19. print "<h2 align=\"center\">Enter Your Password to Continue..</h2>";
  20. // If password is valid let the user get access
  21. if (isset($_POST["password"]) && ($_POST["password"]=="$password")) {
  22. ?>
  23.  
  24.  
  25. <!-- Your stuff goes Here -->
  26. Test test test
  27.  
  28. <?php
  29. }
  30. else
  31. {
  32.  
  33. // Wrong password or no password entered display this message
  34.  
  35. if (isset($_POST['password']) || $password == "") {
  36.   print "<p align=\"center\"><font color=\"red\"><b>Incorrect Password</b><br>Please enter the correct password</font></p>";}
  37.   print "<form method=\"post\"><p align=\"center\">Please enter your password for access<br>";
  38.   print "<input name=\"password\" type=\"password\" size=\"25\" maxlength=\"10\"><input value=\"Login\" type=\"submit\"></p></form>";
  39. }
  40.  
  41. ?>
  42. <BR>
  43. </body>
  44. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement