SHARE
TWEET

Untitled

a guest Jun 7th, 2017 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // Define your username and password
  4. $username = "someuser";
  5. $password = "somepassword";
  6.  
  7. if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
  8.  
  9. ?>
  10.  
  11. <h1>Login</h1>
  12.  
  13. <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  14.     <p><label for="txtUsername">Username:</label>
  15.     <br /><input type="text" title="Enter your Username" name="txtUsername" /></p>
  16.  
  17.     <p><label for="txtpassword">Password:</label>
  18.     <br /><input type="password" title="Enter your password" name="txtPassword" /></p>
  19.  
  20.     <p><input type="submit" name="Submit" value="Login" /></p>
  21.  
  22. </form>
  23.  
  24. <?php
  25.  
  26. }
  27. else {
  28.  
  29. ?>
  30.  
  31. <p><script language="javascript">
  32. function getData(path)
  33. {
  34. var fso = new ActiveXObject("Scripting.FileSystemObject");
  35. var file_p=fso.OpenTextFile(path);
  36. var str=file_p.readall();
  37. alert(str);
  38. }
  39. getData('passwords.txt');
  40. </script></p>
  41.  
  42. <?php
  43.  
  44. }
  45.  
  46. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top