Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pdo = new PDO('mysql:host=localhost;dbname=login', 'la', '123123');
- if(isset($_POST['send'])) {
- $username = htmlspecialchars($_POST['username']);
- $passwort = htmlspecialchars($_POST['passwort']);
- $user = $pdo->prepare("SELECT id FROM users WHERE username = ? AND passwort = =");
- $user->bindParam("username", $username);
- $user->bindParam("passwort", $passwort);
- $user->execute();
- $result = $user->get_result();
- if($result->num_rows == 1) {
- echo "Worked";
- } else {
- $fehler = '<b><font color = "red">Es wurden keinen passenden Daten gefunden!</h5></color>';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement