how should the comment form really work?

If you want to redirect the user to somewhere else after they submit a comment, then all you have to do is include a hidden input in your comment form with the name of “redirect_to” and the value of the URL you want to redirect them to. The lines of code you posted show that directly. No need to hack the core code.

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