Add the code to the \xampp\htdocs folder and view
Code:
http://localhost/script_name.php
in your browser. Make sure you have xamp turned on or else it will give 404 error page. Also you can set up a test server in dreamweaver but for that you would need to google "setting up test server using dreamweaver VERSION_NUM_HERE". Hope this helps.