penders - 5:22 pm on Sep 23, 2013 (gmt 0)
Exactly, which is why bindParam() will not work in your for loop, you would need to use bindValue() here (although you say you already tried this, which is admittedly rather confusing at the mo, unless something else has changed in the code?).
bindParam() won't work in the for loop, since it literally binds the PHP variable $i to the parameter... you end up binding both :type and :name to "testuser1" which is the final value of $i in the loop. (The second argument to bindParam() is passed by reference, not value, as it is with bindValue())