Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('include/config.php');
- echo '<html><head><title>Prodigy Booter</title></head><body>';
- if (isset($_POST['submit'])) {
- if (!(isset($_POST['Username']) && isset($_POST['Password']))) { die('Please fill in a Username and Password.'); }
- $Username = mysql_real_escape_string(strip_tags($_POST['Username']));
- $Password = md5(mysql_real_escape_string(strip_tags($_POST['Password'])));
- $sql = "SELECT * FROM users WHERE username='" .$Username. "' AND Password='" .$Password. "'";
- $query = mysql_query($sql);
- if (mysql_num_rows($query) > 0) {
- $_SESSION['login'] = $Username;
- echo "Successfully logged in.";
- }
- else {
- echo "Username or password is either wrong or doesn't exist.";
- }
- }
- else {
- ?>
- <form action='login.php' method='POST'>
- Username: <input type='text' name='Username' /><br />
- Password: <input type='password' name='Password' /><br />
- <input type='submit' name='submit' value='Login' />
- </form>
- <?php
- }
- echo '</body></html>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement