Save the file in the created “C:\wamp\www\brightHub\" folder as ‘form1.htm’. Now you have successfully made a form in Dreamweaver using HTML.
To understand how this form works, we will put it into use by means of PHP. Create a new .php file in the same directory and name it as “display.php’. This is where our values will go. See the image in step 2, but rename it as .php; in case Windows displays a warning about “file instability". Click Ok to proceed.
In ‘display.php’, paste this code between the body tags:
echo"$fName $lName $gender <br /><br />";
echo" Hi! $fName $lName you are of the $gender gender.<br /><br />";
It should look like this:
Note: Be sure to have the WAMP server up and running before testing it on your browser.
Now, to test, enter http://localhost/brightHub/form1.htm in your browser. You will know that your form is working if your browser will show this image using your own titles:
By clicking the submit button, you were transferred to the display.php page, as shown below:
This is now your complete basic tutorial on how to make forms in Dreamweaver. This tutorial also teaches how the data is utilized by the web server. In case you need to brush-up on your HTML, you may want to visit this article entitled: How to Create a Simple Web Page with HTML Basics.
You can now create other forms for getting feedbacks and asking about your viewer's preferences. However, you should also keep in mind that most viewers prefer the radio button. Thus, they can simply click on the selection over filling-up text fields. Be sure to make every web form user-friendly, simple, and workable.