Code-Samples/php/Php-selectdb2.php Using MySQLi for Database Selection connect_error) { die("Connection not established: " . $connection->connect_error); } // Selecting Database $query = "USE Hospital"; if ($connection->query($query) === TRUE) { echo "Database selection successful."; } else { echo "Unable to select database " . $connection->error; } $connection->close();