Saving metabox keys and storing values as array

Your first line reads:

$key = "key";

And your last line reads:

update_post_meta( $post_id, $key, $data );

So, for all I can see here, if you change it to:

$key = "item_color";

You should be good to go.

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