Advertisement
Guest User

Untitled

a guest
Apr 14th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. $query = "SELECT * FROM `users` WHERE username='$username'
  2.                     and password='".md5($password)."'";
  3.    
  4.         $result = mysqli_query($con,$query) or die(mysql_error());
  5.         $rows = mysqli_num_rows($result);
  6.        
  7.         if($rows==1)
  8.         {
  9.             $_SESSION['username'] = $username;
  10.            
  11.             header("Location: index.php");
  12.         }
  13.         else
  14.         {
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement