Help with a function to create a shortcode

You want add_shortcode(). Read more about add_shortcode() in the Codex.

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