Guest User

Untitled

a guest
May 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include ('encrypt.php');
  4. include ('include/config.php');
  5.  
  6. if(isset($_POST['login'])) {
  7.  
  8. $account = $_POST['account'];
  9. $password = $_POST['password'];
  10. $hash = encrypt($password);
  11.  
  12. $sql = "SELECT account, password FROM user_auth with (nolock) where account=:account AND password=CONVERT(binary, :password)";
  13. $stmt = $dbconnect->prepare($sql);
  14. $stmt->execute(array(':account' => $account, ':password' => $hash));
  15. $row = $stmt->fetch( PDO::FETCH_ASSOC );
  16.  
  17. var_dump($row);
  18. if( $row )
  19. {
  20. echo "tay!";
  21. }
  22. else
  23. {
  24. echo "Incorrect account or password.";
  25. echo "<br />";
  26. echo $account;
  27. echo "<br />";
  28. echo $dbpass;
  29. echo "<br />";
  30. echo $hash;
  31.  
  32.  
  33.  
  34.  
  35. }
  36. }
  37. ?>
  38.  
  39. <html>
  40. <head>
  41. <title>Lineage 2 Control Panel</title>
  42. <link rel="stylesheet" type="text/css" href="style.css" />
  43. </head>
  44. <body>
  45.  
  46. <div class="logo"></div>
  47.  
  48. <div class="login">
  49. <center>
  50. <form method="POST" action="" >
  51. <table border="0">
  52.  
  53. <tr><td>&nbsp;Username</td></tr>
  54. <tr><td><input type="text" name="account" size="25" /></td></tr>
  55.  
  56. <tr><td>&nbsp;Password</td></tr>
  57. <tr><td><input type="password" name="password" size="25" /></td></tr>
  58. <tr><td>&nbsp;<a href="">Forgot password?</a></td></tr>
  59. <tr><td><input type="submit" value="Login" name="login" /></td></tr>
  60.  
  61. </table>
  62. </form>
  63. </center>
  64. </div>
  65.  
  66. </body>
  67. </html>
Add Comment
Please, Sign In to add comment