linking pic previews to posts

Replace this line

<?php the_post_thumbnail(); ?>

with

<?php 
echo '<a href="' . get_permalink() . '">';
the_post_thumbnail(); 
echo '</a>';
?>

You want to use get_permalink() to turn that image into a link.

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