The non-object error is referencing to this area of your code:
PHP Code:
$query->query_mysql("CREATE TABLE $db_table_name(
$query is not declared as an object from any class.
I think you have your syntax mixed up, and are relating it to vBulletin's $DB_site.
vBulletin uses a class that $DB_site is originated from, see includes/init.php and includes/db_mysql.php.
Take a look at the mysql functions:
www.php.net/mysql
You need only run mysql_query() to run queries, no -> notation.
Although, I highly recommend for non-vB uses, to find yourself a good MySQL class to work by. There are many out there, from simple to highly sophisticated, from sites like PHP's
PEAR or
Eclipse (OO library).
Here is a simple example:
http://www.sitepoint.com/forums/show...54&postcount=4
Or:
http://www.sitepoint.com/forums/show...6&postcount=64
Although there are some critical design flaws in the code of that zip, and install.php. It's a good practice and standard not to combine HTML and PHP. Being this is for your friend, it's not that critical, but for larger projects I suggest getting a template engine like
Smarty.
And, in "dbinc.php", there is no reason to separate each code chunk with <?php and ?>, unless you are escaping to place HTML.