Help with php header

every time I try using header(“Location:http://whatever whatever”)

or any other kind of php header, the browser says

“headers already set cannot set headers”

I think this would be better off in the Server-Side forum as PHP is server-side and not client-side.

You need to put the header: line at the very start of the document - like literally, the very first line.

Or you could use output buffering. Check the manual page for ob_start (PHP: ob_start - Manual) for details.