Can I get a url and steps to reproduce it? I see you have added a session_start to the connection file. That seems to have something to do with it, but I'm not sure why. I'll need to debug further by reproducing the issue while editing the files.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.