echo variable containing html and the_permalink();

You need to use get_permalink(), which will return the URL as opposed to echo’ing it.

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