public String register(String username, String password, String name,
                           String creditCard, String address, String phone) throws SQLException {
		if (username.isEmpty()) {
			return "Please enter a username.";
		}
		if (password.isEmpty()) {
			return "Please enter a password.";
		}
		PreparedStatement statement = connection.prepareStatement("SELECT Username FROM Users WHERE Username = ?");
		statement.setString(1, username);
		ResultSet result = statement.executeQuery();

		if (result.next()) {
            return "Username is unavailable. Please choose a different username.";
        }

		LinkedList<String> columns = new LinkedList<String>();
		LinkedList<String> values = new LinkedList<String>();

		columns.add("Username");
		values.add(username);
		columns.add("Password");
		values.add(password);
		if (!name.isEmpty()) {
			columns.add("Name");
			values.add(name);
		}
		if (!creditCard.isEmpty()) {
			columns.add("CreditCard");
			values.add(creditCard);
		}
		if (!address.isEmpty()) {
			columns.add("Address");
			values.add(address);
		}
		if (!phone.isEmpty()) {
			columns.add("Phone");
			values.add(phone);
		}

		boolean success = insertSpecificValues("Users", columns, values);

		if (!success) {
            return "Registration was unsuccessful.";
        }

		logIn(username, password);
		return "Registration was successful.";
	}