Create a customer email form Dreamweaver and PHP
Creating a customer email form
You can apply your knowledge of HTML forms and PHP to very common web tasks, such as collecting information from a user, and sending an email from your PHP code. In the remaining videos of this chapter, I'll show you how to do this task, using a data entry form with a variety of input controls. I'm working with the file join.php which is under the Explorers folder in the web site root for this chapter. This file already has a data entry form.
The form was created as part of a previous video series named Dreamweaver CS5 Essential Training. You can learn more about the structure of this form in that course. One particular thing I want to point out about this form is that it uses a particular kind of element called a legend, and when you look at this particular form in Dreamweaver CS5, it looks like the legend overlaps some of the data entry controls. You can verify that this won't happen when you actually run the page in the browser. I'll use the feature called Inspect. I'll click the Inspect button and I'll copy the file over to the testing server and then I look at the file in Split View.
I'll scroll down to the data entry form and I'll click on the legend element, and Dreamweaver matches up the element seen in Live View on the right with the code, seen in Code View on the left. I can also run the same file in the external browser, and show you that the form looks fine when you see it there. This data entry form has three different sections, but they're all part of the same HTML form. There is a first name, last name, email, address, and so on.
I'll type in some values, and I'll make sure that they match, and you'll see that the validation messages appear and disappear as I type, then I'll scroll down and click the Join button and you'll see that that simply reloads the form. Our job in the remaining videos is to add some more validation tools to the form to capture all of the data being sent in by the form, not just the text fields, but also these check box elements and radio buttons, and then finally, to process the data entry and create an email that you can send from the server.
Along the way I'll work in copies of this file, this one is called join.php. In the next exercise I'll use join2.php, in the next one join3.php, and so on.
WordPress DIY: Community Website66,232 Views
Code Clinic: Ruby80,050 Views
Squarespace 7 Intermediate Techniques42,465 Views
Adobe Color Essential Training20,325 Views
Up and Running with Backbone.js160,931 Views
PHP with MySQL Essential Training4,283,533 Views
Illustrator CC 2013 One-on-One: Fundamentals1,678,359 Views
PHP with MySQL Beyond the Basics2,284,490 Views