robmiller said:Make sure it's called before anything is outputted to the browser - whitespace, echo/print calls, anything.
Thankyou
I had a blank line that I didn't see at the top of the page which caused the problem
Anything else I should change?

