Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
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.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 76729 Viewers
80 Video lessons · 130898 Viewers
52 Video lessons · 64788 Viewers
59 Video lessons · 50616 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.