Is there any way to write custom HTML is some .php file and then call it wherever necessary?

You can use <?php get_template_part( $slug, $name ); ?>

http://codex.wordpress.org/Function_Reference/get_template_part

or a PHP include <?php include("file.php"); ?>

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