“Display Site Title and Tagline” checkbox not working?

this peace of code will help you

        <?php
            if (display_header_text()==true){
                echo '<h1>'.get_bloginfo( 'name' ) .'</h1>';
                echo '<h2>'.get_bloginfo('description').'</h2>';                            
            } else{
                  //do something
            }
          ?>

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