Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($username && $password) {
- $connect = mysql_connect("localhost", "modernwx_paul", "*7w17T3r()") or die("Could not Connect!");
- mysql_select_db("modernwx_prices") or die("Could not Find Data Base");
- $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'];
- }
- if ($username == $dbusername && $password == $dbpassword) {
- header("Location: 'welcome.php'");
- }
- else {
- echo "Incomplete password!";
- }
- }
- else {
- die("That user does not exist!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement