Try browsing the files directly from the browser so you can see them as .php pages. I think you can update your site settings in Dreamweaver to tell it that your site is .php and then it will create the correct extension when you preview. Your issue is that you are viewing .html versions and it won't work if the pages aren't viewed as .php.