Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Create the Database Connection

Create the Database Connection

To connect to the database in Dreamweaver, follow these steps:

  1. Open the index.php file.
  2. In the Application panel click the Database tab to open it.
  3. Next click the Plus (+) button and select the MySQL Connection option:

    Create a new MySQL database connection

    Figure 7. Create a new MySQL database connection

  4. A dialog box opens, allowing you to define the connection parameters. Configure it as shown below:

    • In the Connection Name text box, enter connTravel.
    • In the MySQL server text box enter the address (IP or hostname) of the computer that is running the MySQL database server.
    • In the User name text box, enter the name of the user that is allowed to connect to the database.
    • In the Password text box, enter the password of the user that connects to the database.

      Note: If you do not know your database authentication information, please contact your hosting company or your network administrator.

    • In the Database text field enter the name of the database you have created at the beginning of this article: travel_agency.

      Note: Make sure you replace the sample database authentication information with the actual values for your server.

      Configure the connection parameters

      Figure 8. Configure the connection parameters

  5. Click OK when you’re done to close the dialog box and create the connection. It will appear in the Databases tab:

    The new connection appears in the Databases tab

    Figure 9. The new connection appears in the Databases tab

Once the database connection has been set up, you can create recordsets and apply server behaviors in order to display or process information from the database.

In the next section, you will use data from the table to add content to the site pages.