It is also possible there is another PHP error occurring that is causing the error. It could be that your error reporting level is set to only show warnings.
Add the following code at line 1 of you page to set error reporting to show all errors:
Like Brian said, make sure there are no blank lines or spaces between any of the Closing PHP Blocks "?>" and starting PHP blocks "<?php"
In Dreamweaver, go to View -> Code View Options -> Invisible Elements to force dreamweaver to show spaces and returns, this can make it easier to see if spaces are at the end of any closing php lines.