Remove single quotes for $user and $pass inside $query, since $pdo->quote() will quote the string for use in a query.
Final
First Draft of the Example Files