diff --git a/threadr/login/redirect.php b/threadr/login/redirect.php index f545d17..3578a1e 100644 --- a/threadr/login/redirect.php +++ b/threadr/login/redirect.php @@ -7,7 +7,7 @@ $password = $_POST['password']; $pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!'); $statement = $pdo->prepare('SELECT id, authentication_algorithm, authentication_salt, authentication_string FROM users WHERE name = :username;'); $result = $statement->execute(array('username' => $username)); -if ($result) { +if ($statement->rowCount() > 0) { //existing user name $dbentry = $statement->fetch(); //chechk for correct password