I took this straight from php manual example -- it was almost identical to what I needed but I am still getting this error.
Can someone tell me what I am missing?
execute (the object-based one, as opposed to the older less-favored variant) doesn't actually take any parameters.
From your query and attempted parameters to execute, it looks like you're trying to pass the needed parameters as an array to the execute call. This is not how it's done.
You need to bind variables to the ? markers in a separate call before calling execute.
This question (once fixed with the accepted answer) shows the general process you need to follow: