Please attach a copy of the page in question rather than copy and paste in future posts. They are much easier to debug and figure out line numbers when I'm able to open them in Dreamweaver.
In your case I believe the issue is with blank lines of code... anywhere you see:
?>
<?php
make sure to change it to:
?>
<?php