check if comment submitted was successful

You can use wp_insert_comment($data); function to check your comment is submit or not.

This function will return

(integer) The new comment’s ID. on success & (boolean) false if the insert failed.

Hope this will helps you

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