I think the problem is that $db is a global variable used by vbulletin, and the code you added overwrites it. print_output() not only echoes the output, but it also does some final tasks such as updating the user's last activity time, so you probably want to use it if possible.
If you change all occurences of $db to something else in the code you added, it will probably work with print_output().
|