PDO / PHP - bindValue似乎不起作用

According to everything I've found and seen, this seems correct. When I print $query the outcome is the following:

"INSERT INTO customers (FirstName, MiddleInit, LastName, Address, City, State, Zip, Email, Gender) VALUES (?,?,?,?,?,?,?,?,?)"

The parameters should have been filled in with the variables in bindValues(). So, for example ...

INSERT INTO customers (FirstName, MiddleInit, LastName, Address, City, State, Zip, Email, Gender) VALUES (Bill, A, Hopkins, 123 Ave, ....)

I'd like to stick with this method - it is surrounded by a try/catch block. From printing the query variable out I can see that is where the issue is.

What am I missing? I really appreciate you looking!

$query = 'INSERT INTO customers (FirstName, MiddleInit, LastName, Address, City, State, Zip, Email, Gender) VALUES (?,?,?,?,?,?,?,?,?)';
        echo $query;
        $statement = $db->prepare($query);
        $statement->bindValue(1, $firstName);
        $statement->bindValue(2, $middle);
        $statement->bindValue(3, $lastName);
        $statement->bindValue(4, $address);
        $statement->bindValue(5, $city);
        $statement->bindValue(6, $state);
        $statement->bindValue(7, $zip);
        $statement->bindValue(8, $email);
        $statement->bindValue(9, $gender);
        $success = ($statement->execute());

We need more code considering the error but you can try this with prepared statements:

$query = 'INSERT INTO customers (FirstName, MiddleInit, LastName, Address, City, State, Zip, Email, Gender) VALUES (:firstName, :middle, :lastName, :address, :city, :state, :zip, :email, :gender)';
$statement = $db->prepare($sql);
$statement->execute(array(':firstName'=>$firstName, ':middle'=>$middle, ':lastName'=>$lastName, ':address'=>$address, ':city'=>$city, ':state'=>$state, ':zip'=>$zip, ':email'=>$email, ':gender'=>$gender));