the headers already sent error happens if there is output to the page between php tags.
in your page, i see spaces before the opening php tags on line 4, 5 and 11
there is also a blank space at the end of line 5. these blank spaces are causing the error.