Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Adding validation

From: Dynamic Dreamweaver Websites: Creating and Validating Forms

Video: Adding validation

We now need to take a look at what type of validation we're going to use for our final contact us.PHP page. This is the contact us at scuba vacations form that we've been working on throughout the course. So we want to move into the final creation of the forums and we've looked at a lot of different types of validation. Now I would suggest you go out to the course files and get the chapter seven start files. A couple of these files have been modified and in order to swap out those files for your present files, what you do is go out to the ht docs folder. The ht docs contains our scuba vacations website.

Adding validation

We now need to take a look at what type of validation we're going to use for our final contact us.PHP page. This is the contact us at scuba vacations form that we've been working on throughout the course. So we want to move into the final creation of the forums and we've looked at a lot of different types of validation. Now I would suggest you go out to the course files and get the chapter seven start files. A couple of these files have been modified and in order to swap out those files for your present files, what you do is go out to the ht docs folder. The ht docs contains our scuba vacations website.

Now that ht docs folder on the PC. Is inside the xampp folder on the c drive, or on the Mac side, it's within the applications mamp folder. But once you get inside the xampp or mamp folder, both folders are called ht docs, and that's the folder that contains the website. You can simply replace this folder with the Chapter Seven start files for this course.

It does have the final version of our form within that file. I've also made a couple of minor modifications to a couple of other files as well. So please go out and get the chapter seven start files. And replace your folder, your scuba vac folder, inside HT Docs, with that version. All right, so we have to design what type of form validation were going to use. And the one I have chosen is Server Side Validation I'll open up that file and put it in the browser. This is the same file we looked at earlier.

This file was talked about in the server validation movie. This form has some required fields on it. If I click the Submit button, you can see there is red text that appears on the form, our form fields also turn red and that's the type of validation I want for our Scuba Vacations website, right now if we actually enter form data, I will go ahead and do that to show you the only thing this page is doing is printing out whatever I put into the forum at the top of the page here. So above the header you'll see and h one and here's the h one information. All we're doing is printing a message onto this page at this point in this file.

The final version of our Contact Us page is not going to do that. It's going to take the same form information that's now being printed at the top of the page and it's going to move it into an email format to be sent by the web server out as an email. So I'm going to use this server validate. Basically this same format, but if we look in the code what will be replaced in our final version, is up at the top here we are simply echoing the message.

This message right here, that we built within this area of the coding. Is what's going into the Header1 at the top of the page. So we need to replace line 54 with email coding, so that it can get sent as an actual message via email. So we'll take a look at that when we look at the final version of our form.

Show transcript

This video is part of

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Dynamic Dreamweaver Websites: Creating and Validating Forms.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.