From the code that you posted, and that is being written to your page, it looks as though the server that your files are on may not be configured to render php pages, - it looks as though PHP code is being written to an html page.
Is the hosting server windows or Unix based, and do you have other php pages rendering correctly?