Advertisement
Guest User

Untitled

a guest
Jul 8th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. include_once ("connect_to_mysql.php");
  6.  
  7. $username = $_POST['username'];
  8. $password = $_POST['password'];
  9.  
  10. $sql = ("SELECT * FROM members WHERE username='%s' AND password='%s'", mysql_real_escape_string($username), mysql_real_escape_string($password));
  11.  
  12. $result = mysql_query($sql);
  13. $count = mysql_num_rows($result);
  14.  
  15. if($count!=0){
  16.  
  17. echo "Good";
  18.  
  19. } else {
  20.  
  21. echo "Wrong Username or Password";
  22. }
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement