miket3 wrote:ok. thanks. As long as you confirmed that my syntax was correct I went back and found that I missed using $this in a spot. Actually, You missed the same exact instance that i missed!!!! Can you find it?
Don't try making people hunt for mistakes. It comes off as very smug, especially when the person is trying to help you. I have a feeling that either you don't know what you're talking about, or he left it out on purpose.
Weirdan gave you general tips in the code snippet he provided... I don't blame him at all for not rewriting ALL your code. It would be much more constructive to point out what you THINK he left out, and ask why he did, and if it's correct.
Here's what I got from Weirdan's reply:
1. Don't use global variables, especially in functions.
2. $this->doc references the property $doc in the current instance of the class (the object in the script that uses the class).
3. $this->doc->createElement( ... ) calls the method createElement() of the DOMDocument class inside the current instance (the $doc object inside the current instance of the dbFormClass).
That's a pretty thorough example of what you were doing wrong, and how to fix it. You should be able to understand OOP better because of it. I certainly do.