Just wondering if anyone can help me here. i am trying to install a uploader script and i get this error when installed. can someone help me please "MySQL Error: No database selected on line 25" <?php @define ( 'NO_AUTH_CHECK', 1 ); require 'includes/commons.inc.php'; require 'includes/pub_settings.inc.php'; $tpl_main = new Template ( TPL_DIR . 'tpl_main.php' ); // for public uploader $upload_max = get_byte_value ( ini_get ( 'upload_max_filesize' ) ); $post_max = get_byte_value ( ini_get ( 'post_max_size' ) ); $max_php_file_size = min ( $upload_max, $post_max ); $max_filesize = $PUB['max_file_size'] > 0 ? $PUB['max_file_size'] * 1024 : $max_php_file_size; $restrictions = array ( 'max_file_size' => $max_filesize, 'allowed_types' => $PUB['images_only'] ? 'jpg,jpeg,gif,png' : $PUB['allowed_filetypes'], 'images_only' => $PUB['images_only'] ); $tpl_main->set ( 'restrictions', $restrictions ); // Get latest users $new_users = array(); $new_user_limit = (int)$UPL['SETTINGS']['new_user_limit']; $result = $mysqlDB->query ( "SELECT * FROM uploader_users ORDER BY userid DESC LIMIT $new_user_limit" ); if ( $result->error() ) exit ( $mysqlDB->error ( __LINE__, __FILE__ ) ); while ( false !== ( $user = $result->fetchRow('assoc') ) ) { processUser ( $user ); $new_users[] = $user; } $result->free(); $tpl_main->set ( 'new_users', $new_users ); PHP:
You need a file that connects to your MySQL server. Its usually called config.php. In this case it might be commons.inc.php. Double check that. Good Luck