forked from root/threadr.lostcave.ddnss.de
trying proper code now
parent
171b99b2d6
commit
b6833c099c
|
@ -5,7 +5,12 @@ $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;');
|
$statement = $pdo->prepare('SELECT id, name, authentication_algorithm, authentication_string FROM users WHERE name = :username;');
|
||||||
$result = $statement->execute(array('username' => $username));
|
$result = $statement->execute(array('username' => $username));
|
||||||
echo $result[0]['name'];
|
if ($result) {
|
||||||
|
//existing user name
|
||||||
|
print_r($statement->fetch());
|
||||||
|
} else {
|
||||||
|
//wrong user name
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue