Since the script produces output no-matter-what, I'd have to say that there's an error. As I said, I haven't tested it yet. I did update it this morning, since I discovered there was a missing function in the first post. You might try it again; make sure your copy of the script has the functionconnectToDB()defined.
However, if you didn't see any errors, you need to make sure error reporting is turned on. (Don't display errors on your live site, obviously, but during development it's essential to see every last error.)
PHP Code:<?php
// very top of script
error_reporting( -1 );
ini_set('display_errors', '1');
// . . .

