Sounds like there is a problem with the Dreamweaver Site definition settings. see the following tutorial for details on setting up your site definition:
http://www.webassist.com/tutorials/Define-a-dynamic-site-in-CS5
also see this tutorial for details on creating the database connection:
http://www.webassist.com/tutorials/Create-a-PHP-database-connection