Display an icon based on post type

<?php 
   $post_type = get_post_type($post);
   switch ($post_type) {
       case "type1":
           echo "<img src="https://wordpress.stackexchange.com/questions/35564/label1.png"/>";
           break;
       case "type2":
           echo "<img src="label2.png"/>";
           break;
   }
?>

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