Need to echo category id in multi-dimensional array

$term_id = get_terms('category'); is unnecessary, the current category object is held within $film_category. $film_category->term_id will give you the ID of the category you are currently fetching posts from.

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