Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php>
- $username = $_POST['username'];
- $password = $_POST['password'];
- if ($username&&$password)
- {
- $connect = mysql_connect("mysql17.000webhost.com","a9703423_george","fatlard1") or die("Could not connect!");
- mysql_select_db("a9703423_login") or die("Could not find db");
- $query = mysql_query("SELECT * FROM users WHERE username='$username'");
- $numrows = mysql_num_rows($query);
- if ($numrows!=0)
- {
- while ($row =mysql_fetch_assoc($query))
- {
- $dbusername = $row['username'];
- $dbpassword = $row['password'];
- }
- {
- // check to see if they match!
- if ($username==$dbusername&&$password==$dbpassword)
- }
- {
- else
- echo "Incorrect password!";
- {
- }
- else
- die("That user does not exist");
- }
- else
- die("Please enter a username and password");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement