SHARE
TWEET

Untitled

a guest Dec 10th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     $pdo = new PDO('mysql:host=localhost;dbname=login', 'la', '123123');
  3.  
  4.     if(isset($_POST['send'])) {
  5.  
  6.         $username = htmlspecialchars($_POST['username']);
  7.         $passwort = htmlspecialchars($_POST['passwort']);
  8.  
  9.         $user = $pdo->prepare("SELECT id FROM users WHERE username = ? AND passwort = =");
  10.         $user->bindParam("username", $username);
  11.         $user->bindParam("passwort", $passwort);
  12.         $user->execute();
  13.         $result = $user->get_result();
  14.  
  15.         if($result->num_rows == 1) {
  16.             echo "Worked";
  17.         } else {
  18.             $fehler = '<b><font color = "red">Es wurden keinen passenden Daten gefunden!</h5></color>';
  19.         }
  20.     }
  21. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top