master
LinuxMint4Ever 2020-02-20 00:55:42 +01:00
parent 8350335430
commit 171b99b2d6
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ $password = $_POST['password'];
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!'); $pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
$statement = $pdo->prepare('SELECT id, name, authentication_algorithm, authentication_string FROM users WHERE name = :username;'); $statement = $pdo->prepare('SELECT id, name, authentication_algorithm, authentication_string FROM users;');
$result = $statement->execute(array('username' => $username)); $result = $statement->execute(array('username' => $username));
echo $result['name']; echo $result[0]['name'];
?> ?>