Got it to work now, forgot to add 'echo' at the start.
Just wondering, does it matter where you paste the code in html_header?