Advertisement
Guest User

Untitled

a guest
May 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. include_once('inc/connection.inc.php');
  5.  
  6.  
  7.  
  8. if (isset($_POST['submit']))
  9.  
  10. {
  11. $username = $_POST['username'];
  12. $password = $_POST['password'];
  13.  
  14. $query = "select userName, password from tbl_customers where userName = '$username' ";
  15. $result =$db -> query ($query);
  16. $row = $result->fetch_array(MYSQLI_ASSOC);
  17.  
  18. if (password_verify($password,$row['password']))
  19. {
  20. $_SESSION['logged'];
  21. header('location:index.php');
  22.  
  23. }
  24. else
  25. {
  26. echo "error";
  27. }
  28. }
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement