Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include ('encrypt.php');
- include ('include/config.php');
- if(isset($_POST['login'])) {
- $account = $_POST['account'];
- $password = $_POST['password'];
- $hash = encrypt($password);
- $sql = "SELECT account, password FROM user_auth with (nolock) where account=:account AND password=CONVERT(binary, :password)";
- $stmt = $dbconnect->prepare($sql);
- $stmt->execute(array(':account' => $account, ':password' => $hash));
- $row = $stmt->fetch( PDO::FETCH_ASSOC );
- var_dump($row);
- if( $row )
- {
- echo "tay!";
- }
- else
- {
- echo "Incorrect account or password.";
- echo "<br />";
- echo $account;
- echo "<br />";
- echo $dbpass;
- echo "<br />";
- echo $hash;
- }
- }
- ?>
- <html>
- <head>
- <title>Lineage 2 Control Panel</title>
- <link rel="stylesheet" type="text/css" href="style.css" />
- </head>
- <body>
- <div class="logo"></div>
- <div class="login">
- <center>
- <form method="POST" action="" >
- <table border="0">
- <tr><td> Username</td></tr>
- <tr><td><input type="text" name="account" size="25" /></td></tr>
- <tr><td> Password</td></tr>
- <tr><td><input type="password" name="password" size="25" /></td></tr>
- <tr><td> <a href="">Forgot password?</a></td></tr>
- <tr><td><input type="submit" value="Login" name="login" /></td></tr>
- </table>
- </form>
- </center>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment