Advertisement
Guest User

หน้าหี

a guest
Mar 26th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. if($_SERVER["REQUEST_METHOD"] == "POST")
  3. {
  4. require_once 'config.php';
  5. $sql="select * from users where username=:username";
  6. $stmt= $pdo->prepare($sql);
  7. $stmt=bineParam(':username',$username,PDO::PARAM_STR);
  8. $stmt=execute();
  9. if($stmt->rowCount() == 1)
  10. {
  11. $row= $stmt->fetch();
  12. $hasspassword=$row['password'];
  13. if($password == $hashpassword)
  14. {
  15. session_start();
  16. $_SESSION['username']= $username;
  17. header('Location:mytable.php');
  18.  
  19. }
  20. else
  21. header('Location:login.php');
  22. }
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement