How Do I Create Forms in Dreamweaver That Connect to a Database?

Dreamweaver is a WYSIWYG (what you see is what you get) web-authoring application developed by Adobe. Dreamweaver has a set of tools to create any type of webpage, even a dyanamic website with a database back end. Advanced web developers use a combination of several web programming languages -- including HTML, PHP and MySQL -- to create a web form that connects to a database. With Dreamweaver, you don't need be an advanced web developer to do this. You just need to know how to connect to your database and add the elements in a form in Dreamweaver.

Instructions

    • 1

      Right-click on the Windows "Start" button and then click "Open Windows Explorer." Navigate to a folder on your computer and create a new folder that will hold your website files. Name the folder and close Windows Explorer. You will need to know the name and location of this folder later.

    • 2

      Double-click on the Dreamweaver icon on your desktop to open it. Click on the option to create a new webpage or open an existing one from the welcome screen. Click on the "Save" icon to save a page as "index.html" into the folder you created in Step 1. This page will work as your website's home page. You don't have to add anything to this page at this time; it can be blank for now.

    • 3

      Click on "Site" and then "New Site" to set up your local site. Type in the name for your website, the file location for the site folder created in Step 1, the HTTP address for your website and click in the box to "Enable Cache" in the "Local Info" step in the process. Click on "OK."

    • 4

      Click on "Site" and then "Define Sites" to associate your local site with the remote server. The remote server is the server that hosts your website. Click on name of the local site you are currently working in before clicking on "Edit." Click on the "Remote Info" list item in the "Category" list. Click the drop-down arrow next to "Access" and then click on "FTP." Click "OK." In the next window, type in your FTP host in the "FTP Host" field and the directory on your web server that you want the Dreamweaver files sent to in the "Host Directory" field. Type in the username and password login information for your FTP server account. Select your firewall options and then click "OK."

    • 5

      Click on "Window" and then "Database" to start a connection your local site to your online database. The Database property window open in the left-hand pane. Click on the "+" button and then "MySQL Connection." Type in the connection name, MySQL server, username, password and database information in the "MySQL Connection" pop-up window. The "Connection name" can be whatever you choose to name it. The "MySQL server" is the type of server connection you are making; this is usually "localhost" unless otherwise stipulated by your web hosting provider. The username and password are the login credentials you use to connect to your database. The "Database" is the name of the database on your server that you want Dreamweaver to connect to.

    • 6

      Click on the "Bindings" tab on the Application Panel on the left-hand pane. Click on the "+" button and then "Record Set." Type a name for the recordset in the "Name" field. Click the dropdown arrow next to "Connection" and choose the connection you created in Step 5. Choose the table you want to bind to your web form.

      For instance, if you are creating a contact form that will be connected to a database, choose the table on the web server that holds all the contact information for your website visitors. See the fields from your database tables populated in the "Columns:" field. Click on the "All" option if you would like to keep all of the fields or the "Selected" option and then the fields you want to include. Select your filter and sort options and then click on "OK."

    • 7

      Click on "Insert" and then "Form" to add a form to the webpage. Click and drag elements from the "Bindings" tab on the left-hand pane onto your form. The elements from your database will be added to the webpage. For instance, with the contact form and table, drag over the "First Name" field, and Dreamweaver will populate a text field that will be bound to the table. Continue to drag over all of the elements from your table onto your form. Arrange these form items in a way that is visually appealing for you.

    • 8

      Click on the "Save" icon to save your website files and web form.

Tips & Warnings

  • An FTP account comes standard with your web hosting account. You will find your FTP information, including username and password, in the control panel for your hosting account. If you are still unsure what this is, contact your hosting provider for this information.

Related Searches:

References

Resources

Comments

Related Ads

Featured