Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1.     $numrows = mysql_num_rows($query);
  2.     if ($numrows != 0)
  3.     {
  4.    
  5.     while ($row=mysql_fetch_assoc($query))
  6.         {
  7.             $dbusername= $row['username'];
  8.             $dbpassword = $row['password'];
  9.         }
  10.         // do they match?
  11.         if ($username == $dbusername && $password == $dbpassword)
  12.         {
  13.         echo "Welcome. Click <a href='member.php' title='The Game :D'>here</a> for the premium section";
  14.         $_SESSION['username'] = $dbusername;
  15.         }
  16.         else
  17.         die ("Password Incorrect.");
  18.     }
  19.     else
  20.         die ("User does not exist.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement