Advertisement
Guest User

Untitled

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