Does your web server support PHP?
Did you save the file with a filename extension that your web server knows to process as PHP?
If testing on a local PC installation, did you launch the page on your browser via a http:// request (as opposed to double-clicking the file or using the browser's File -> Open menu option)?