Create the PHP File In Dreamweaver and save it to your defined Dreamweaver site.
the only time you should be prompted for a program to open the file with is if you double click it in the windows explorer, instead of double clicking i the file, use the Dreamweaver File -> Open dialog to open the file.