How to Set Up a PHP/MySQL Site in Dreamweaver
In order to set up a site in Adobe Dreamweaver, you need to understand what is Dreamweaver and WAMP. Let's have a brief discussion about them.What is Dreamweaver and What Can It Do?
Dreamweaver is a software program provided by Adobe. It is software developed for designing web pages. It is IDE (Integrated Development Environment) which various tools and features that make web designing and development process lot easier for the programmer (who may be a newbie or experienced).
The best part: if you modify your code, Dreamweaver will automatically make the necessary changes and display it on the visual side as well without uploading to the server or using a web browser.
In simple words, it is an editor which helps in creating simple or complex websites.
Dreamweaver supports the languages that are normally used for web design (HTML5, CSS, JavaScript, PHP) and many more.
The most important parts of Adobe Dreamweaver are – Visual Interface & Full Featured Code Editor
Visual Interface
You can easily create a website by using the visual interface it has. Various menus and toolboxes are provided for the ease of the user.
This lets you build websites by simply dragging and dropping the elements with your mouse. This allows you to build the structure/layout of the website quickly without writing a single line of code. In the background, Dreamweaver will automatically write the necessary code for you.
This visual interface gives you an impression like viewing your website in your web browser along with the ability to manipulate it.
However, if you experienced and want to write your own code then Dreamweaver has got your covered. It has advanced tools and features to help and support you.
Full Featured Code Editor
What to do you mean by full-featured code editor?
It is not just an editor where you type your code, but it has many functions that are very helpful while coding and makes it easier in debugging process. Let’s discuss few of them
Syntax highlighting — different elements are highlighted in different colors. This makes it easier to read and correct the code.
Auto Completion of Code — provides suggestions when you write something. You can select from the suggestion. On one hand, you don’t have to type everything completely and on another hand, it saves your time.
Code collapsing — sometimes the code can be very large and you may face difficulty in reading and also makes it difficult to find errors. It has Code collapsing feature for making code easier to read. It allows you to visually shrink parts of your code when you don’t need it.
What is WAMP?
Stands for "Windows, Apache, MySQL, and PHP."
When WAMP is installed, it automatically installs all three on your local computer.
Apache is a web server. It acts as a local web server that allows testing your PHP scripts locally without uploading to the actual and live web server.
MySQL is a relational database that allows to store and manipulate the data.
PHP is a server-side scripting language that can be used to access data from the database.
Now you have installed both – Dreamweaver and WAMP. Next step is to write PHP code in Dreamweaver and execute it. But most of the beginners struggle to run the PHP script as it requires to set up the site in Dreamweaver.
The most common problem faced while using Dreamweaver is related to setup Dreamweaver with WAMP
Their frequently asked questions are
How do I setup Dreamweaver?
How to setup a PHP site in Dreamweaver 8?
How to run PHP files in Dreamweaver?
The answer is to follow the simple steps.
10 steps to set up a site in Dreamweaver using WAMP
Step 1 – Start Dreamweaver
Step 2 – Click on Site Menu > Select New Site (if setting up for first time else select Manage Sites)
Site Definition Wizard will be displayed on the screen. Follow below-given steps
Under Basic Tab,
Step 3 – Provide the name of your site (any name to identify your site)
For Example – PHP Programs
Step 4 – Provide HTTP address (URL) of your site
It is the folder name under “WWW” in WAMP directory.
For example – "http:// localhost/myprograms
Step 5 – Select whether you want to work with a server technology such as ASP.NET, ColdFusion or PHP?
Select option – “Yes, I want to use a server technology”
Which server technology? - “PHP MySQL”
Click on Next button
Step 6 – Select how do you want to work with your files during development?
Select option – “Edit and test locally (my testing server is on this computer)”
Step 7 – Provide the place where on your computer do you want to store your files. (the folder that you have created under WWW folder of WAMP)
Type in “C:\wamp\www\myprograms”
Click on Next button
Step 8 – Provide what URL you would use to browse the root of your site.
Type in “http:// localhost/myprograms”
Click on Test URL button
If it is configured correctly then you will receive message “The URL prefix test was successful” on your screen. Click Ok button
Step 9 – Provide an answer to “When you are done editing a file, do you copy it to another machine?”
Select option – “No”
Click on Next button
You’ll get the summary on the screen. Click on Done button.
This will show up all the files in that folder in the tab name Files on the right-hand side of your screen
Step 10 – Either create new PHP file or select from the list and view it in the browser.
Conclusion
The answer to the question “How to Set Up a PHP/MySQL Site in Dreamweaver” is that you must have Dreamweaver and WAMP installed on your computer. This is a prerequisite. Then follow the simple easy steps to set up your site in Dreamweaver.