WP Error using wp_insert_term

Move the $make_new[‘term_id’] inside the block that runs when there is no error.

Do you have your WP_DEBUG on? What is the error message?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)