2020-02-19 15:50:13 +01:00
|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
$username = $_POST['username'];
|
|
|
|
$password = $_POST['password'];
|
|
|
|
|
|
|
|
|
|
|
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
2020-02-20 00:50:28 +01:00
|
|
|
$statement = $pdo->prepare('SELECT id, name, authentication_algorithm, authentication_string FROM users WHERE name = :username;');
|
2020-02-19 15:50:13 +01:00
|
|
|
$result = $statement->execute(array('username' => $username));
|
2020-02-20 00:52:24 +01:00
|
|
|
echo $result['name'];
|
2020-02-19 15:50:13 +01:00
|
|
|
?>
|