How to Create a PHP Website Using Dreamweaver 8

The beauty of Web design software like Dreamweaver 8 is that you have the ability to quickly see how code translates into visual layout without having to constantly upload new code. Basically, Dreamweaver has miniature versions of popular browser programs (e.g. Firefox, Internet Explorer, Opera, Safari, Netscape) that it uses to translate HTML code into page layout. However, PHP is a server-side scripting language, meaning that it is designed to be read by server programs (as opposed to client programs like Web browsers). The way a PHP website works is that the PHP code (which is embedded within HTML code) must first be sent to the server. After the server reads and processes the PHP, it sends new HTML code to the client's computer, whose browser software then converts it into Web page layout.

In order to effectively create, edit and view PHP websites on Dreamweaver, first set up a virtual "test server" within the program that will read and convert the PHP changes into HTML changes.

Instructions

  1. Setting Up the Test Server

    • 1

      Download XAMPP, a free suite of server technologies including PHP, MySQL, phpMyAdmin and Apache for your particular operating system (see Resources section).

    • 2

      Select "Basic Package Installer."

    • 3

      Double-click the downloaded installer.

    • 4

      Click "Install" in the resulting pop-up window.

    • 5

      Click "Yes" at the end of the installation process to open the XAMPP control panel.

    • 6

      Click the "Start" buttons next to "Apache" and "MySQL."

    Creating the Website

    • 7

      Run Dreamweaver 8.

    • 8

      Click "Site" in the main window's toolbar and select "Manage Sites..."

    • 9

      Click "New" and select "Site" in the Manage Sites window.

    • 10

      Click on the "Advanced" tab.

    • 11

      Give your site a name (e.g., MyPhpSite) and click on the "Browse" icon next to "Local Root Folder."

    • 12

      Select a folder called "htdocs." If you're running Windows, find "htdocs" in the "C:\xampp\" folder. If you're running OS X, find "htdocs" in the "Applications: MAMP:" folder.

    • 13

      Create a new folder inside "htdocs" called "MyPhpSite" (or whatever name you chose for your site in Step 5) and click "OK."

    • 14

      Type "http://localhost.com/MyPhpSite" into the "HTTP address" text box.

    • 15

      Click on "Testing Server" in the category list to the left.

    • 16

      Select "PHP MySQL" under "Server Model."

    • 17

      Select "Local/Network" under "Access."

    • 18

      Enter "http://localhost.com/MyPhpSite" under "URL Prefix."

    • 19

      Click "OK."

    • 20

      Click on the "Basic" tab.

    • 21

      Check "Yes, I want to use a server technology" and select "PHP MySQL." Then click "Next."

    • 22

      Check "Edit and test locally (my testing server is on this computer)" and click "Next."

    • 23

      Enter "http://localhost/MyPhpSite/" in the text field underneath "What URL would you use to browse to the root of your site" and click "Next."

    • 24

      Select "FTP" for "How do you connect to your remote server?"

    • 25

      Type "ftp.myhost.com" under "What is the hostname or FTP address of your Web server?"

    • 26

      Type "MyPhpSite" under "What folder on the server do you want to store files in?"

    • 27

      Enter the username and password for your FTP site and click "Next." If you don't know this, contact your hosting provider (e.g., GoDaddy.com) to find it.

    • 28

      Click "Done."

    Creating the MySQL Database

    • 29

      Open an Internet browser and type "http://localhost/phpmyadmin/" into the address text field and press "Enter."

    • 30

      Type "Feedback" in the "Create New Database" text field and click "Create."

    • 31

      Click "Import."

    • 32

      Click the "Browse" button next to "Location of the text file."

    • 33

      Navigate to the "Feedback" folder, which is located in the "htdocs" folder.

    • 34

      Open the folder titled "Data."

    • 35

      Select the file called "myphpsite.sql" and click "Go." At this point, you have a fully-functioning PHP and MySQL website running on Dreamweaver 8.

Related Searches:

References

Resources

Comments

You May Also Like

Related Ads

Featured