Hello again DaniWeb!
I'm designing a dynamic website in PHP, and it's structured so that each page creates the necessary objects (based on what content is being viewed) which get the right information to display. Smarty then organizes this content and makes it look good.
The problem is, I have most of these objects creating a new database object, so I end up with multiple database connections which is unnecessary. To solve this, I'd rather not have to make a $db object and then use the global keyword in every single object to pull that variable in, so is there a better way?
Thanks a lot, and let me know if I could be designing this any better. I've never done anything like this before.