How can I turn this to PDO? I tried, but I don't know how.
It was `MySQLi` at first and I tried to turn it to `PDO` and so, that was the result:

```
<?php
    $username = $_POST['username'];
    $password = $_POST['password'];

    $stmt = $conn-> prepare("SELECT * FROM resident WHERE '$username' = ? AND '$password' = ?");
    //mysqli_stmt_bind_param($sql, "ss", $username, $password);
    $stmt->bindParam(':username', $username);
    $stmt->bindParam(':password', $password);
    $stmt ->execute();
    mysqli_stmt_store_result($sql);
    $stmt-> BindParam($sql, $name, $username, $password);
    $response=array();
    $response["succes"] = false;
    while (mysqli_stmt_fetch($sql)) {
        $response["success"] = true;
        $response["name"]= $name;
    }
    echo json_encode ($response);
?>

```