In Dreamweaver, you can create dynamic pages, which use PHP or other scripting languages to connect to a MySQL database to create pages with dynamic content.
In order to create these pages, you need to first connect Dreamweaver to the MySQL database.
To connect Dreamweaver:
- Open Dreamweaver
- Open a new file
- Select ‘Dynamic Page’ as the type, and then ‘PHP’ or another language
- Click ‘Create’
- Your new dynamic page will appear as a blank page
- In ‘Tools’, select ‘Application’, then ‘Database’
- If you have already created a site, skip the first option
- Since you have already created the document type, skip the second option
- Click the ‘Testing Server’ link in the third option
- Select the server model that matches up to the language you chose in Step 3 (for example, ‘PHP MySQL’)
- Select ‘FTP’ for access, and enter in the FTP host for your domain name
- Enter in the directory you would like to upload the files to under ‘Host Directory’
- Enter in your FTP login
- Enter in your FTP password
- Enter in the full URL for your site under URL Prefix (for example, http://your-domain.com)
- Click ‘OK’
- In the ‘Databases’ tab, click the + icon at the top of the window and choose ‘MySQL Connection’
- Your connection name can be anything, as this is only a descriptive name for you to recognise the connection
- Enter in ‘localhost’ for the MySQL Server Name
- Enter in the database’s user name
- Enter in the database’s user name’s password
- Under ‘Database’, enter in the database’s user name again
- Click ‘Test’
- If the test is successful, click ‘OK’
- The connection is now available to create dynamic pages