Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. if (isset($_POST['submit'])){
  2.  
  3. $rusername = mysqli_real_escape_string($conn, $_POST['username']);
  4. $rpassword = mysqli_real_escape_string($conn, password_verify($_POST['password'], PASSWORD_DEFAULT));
  5.  
  6. $query = "SELECT * FROM userinfo WHERE username='$rusername' AND password='$rpassword'";
  7. $sql = mysqli_query($conn, $query);
  8.  
  9. if(mysqli_num_rows($sql) == 1)
  10. {
  11. $row = mysqli_fetch_assoc($conn, $sql);
  12. $_SESSION['username'] = $row['username'];
  13. header('Location: member.php');
  14. exit();
  15. }
  16. else
  17. {
  18. $errMsg = "Username or password wrong, please check and try again!";
  19. } };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement