Guest User

Untitled

a guest
Jan 29th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. ini_set('display_errors', 1);
  3. ini_set('display_startup_errors', 1);
  4. error_reporting(E_ALL);
  5. /* Connection */
  6.  
  7. try {
  8. $db = new PDO("mysql:host=localhost;dbname=kurye_fiyatlama", "root", "qweASD123");
  9. } catch ( PDOException $e ){
  10. print $e->getMessage();
  11. }
  12.  
  13. $stmt = $db->prepare("select * from users_table WHERE username=:username and password=:password");
  14. $stmt->execute(['username' => $username, 'password' => $password]);
  15. $user = $stmt->fetch();
  16.  
  17. foreach ($data as $user) {
  18. if($_POST["username"] = $data["username"] && password_verify($_POST["password"], $data["password"])){
  19. header('Location: dataentry.php');
  20. }
  21. }
  22.  
  23.  
  24. ?>
Add Comment
Please, Sign In to add comment