Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Coded by `P R O D I G Y™
- * @copyright 2011 - InterBB
- * This source is released as free, under the GNU-GPL License.
- */
- require("header.php");
- $username = clean($_POST['username']);
- $password = hash('sha512', $_POST['password']);
- if (isset($_POST['username']) && isset($_POST['password'])) {
- $sql = mysql_query("SELECT * FROM users WHERE username = '" . $username . "' AND password = '" . $password . "' LIMIT 1")or die(mysql_error());
- $rows = mysql_num_rows($sql);
- if (count($rows) > 0) {
- $_SESSION['username'] = $username;
- echo "Yep";
- }
- else {
- displayError("You have specified an invalid username or password.");
- }
- }
- ?>
- <form name="input" action="login.php" method="post">
- Username: <input type="text" name="username" /><br />
- Password: <input type="password" name="password" /><br />
- <input type="submit" value="Login" />
- </form>
- <?php
- require("footer.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement