Watching:

Create a customer email form Dreamweaver and PHP


show more Creating a customer email form provides you with in-depth training on Business. Taught by David Gassner as part of the Dreamweaver with PHP and MySQL show less
please wait ...

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.

There's login information and profile information at the bottom, and the Join button. When you click the Join button, it triggers some validation tools that are already built into the form. The password and confirm password elements use validation tools that are a part of this Spry/Ajax Framework. Spry is a set of JavaScript and CSS files that are delivered by Dreamweaver CS5 and are included in this form. In this particular form, the password and confirm password elements are required and they must match.

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.

Creating a customer email form
Video duration: 3m 9s 4h 55m Intermediate Updated Jun 12, 2012

Viewers:

Creating a customer email form provides you with in-depth training on Business. Taught by David Gassner as part of the Dreamweaver with PHP and MySQL

Subjects:
Business Developer Web
Software:
Dreamweaver
Author:
please wait ...