Did you use php open and closing tags? If you did, you should remove those and try again. This is the main cause of problems using the php module. Also make sure the php runs on a regular html page before trying the code in a module.
Go to Admincp >> Options >> General settings and disable "Disable PHP, Static HTML, and Ad Module rendering". Then you can edit the page with site builder.
Here is a tutorial on using PHP modules in VB5
http://www.vbulletin.com/forum/blogs...mysql-database