Thank you so much and apologies for not reading your question about errors more carefully. I have not fully understood the error process and done some cutting and pasting with error code, thus some of what you describe, particularly the double declaration. You've given me something to work with. I am going to take some time to fully understand what you have described and see what I can do. Good advice and insights that I haven't heard before. I'm using Xampp for my php/mysql server and have never checked to see how the errors are set. There are clearly some things I am going to have to look into. I'll see what I can do and get back with the results.
I guess there is still an issue as to why the prepare() statement is failing but if I can get the error stuff straightened out maybe I can find out.