Start learning with our library of video tutorials taught by experts. Get started

Dynamic Dreamweaver Websites: Creating and Validating Forms

Building the course template


From:

Dynamic Dreamweaver Websites: Creating and Validating Forms

with Candyce Mairs

Video: Building the course template

We are now going to build a template page for our website to use as a base for any additional pages we need. And this template page is going to use a concept of includes, to pull in our header image, and our footer image. Let me show you the header image, and that is the file named header scuba. If I open this up, what I actually have on this page, is 2 div tags. So I've added the div tags within the include file.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Dynamic Dreamweaver Websites: Creating and Validating Forms
3h 34m Intermediate May 19, 2011

Viewers: in countries Watching now:

Forms perform an essential function in modern websites, making it possible to gather information from users and validate that information. In this course, Adobe Certified Expert Candyce Mairs shows how to create forms to email user information and validate user data using various methods of form validation. These validation methods include client-side, server-side, and custom validation; CAPTCHA images; and Spry validation fields. You'll also see how to set up a PHP testing environment and preview PHP pages in Dreamweaver. Along the way you'll build your skills in areas like using admin consoles, commenting code, working with variables and includes, and much more.

Topics include:
  • Installing XAMPP on a Windows system
  • Installing MAMP on a Mac system
  • Using admin consoles
  • Creating PHP pages
  • Commenting code
  • Working with web forms
  • Adding custom validation
  • Using redirects
  • Dealing with email issues
Subjects:
Developer Web Web Design Web Development video2brain
Software:
Dreamweaver
Author:
Candyce Mairs

Building the course template

We are now going to build a template page for our website to use as a base for any additional pages we need. And this template page is going to use a concept of includes, to pull in our header image, and our footer image. Let me show you the header image, and that is the file named header scuba. If I open this up, what I actually have on this page, is 2 div tags. So I've added the div tags within the include file.

So this is all being based on CSS. One is called the header, which is pulling in our header image for the website. The second div is pulling in our nav bar information. So what this page looks like is this without the CSS. Now, all of these navigational pieces, all of these hyperlinks, once we get them onto the main template page. We'll pull in the CSS file and they will be formatted that way. So, they won't look like they do now, in Default view once we actually get them on our template page.

So that is our header scuba, that's the page we want to pull in. So lets open up the template page to do it. Now, our template page is simply a div tag with some page content. So, we have our div tag here for the main content of our page, that's going inside a div called main. So the header include goes above it, the footer goes below it. So, let's go ahead and add this. Now, we need a PHP code block in order to add this, so I'll go up to the PHP tab, click on the Code Block, and Ill add some space in here.

As I said, you don't have to do that, but I think it makes it a little quicker to read, if you need to modify it later, and it'll also make it easier for you to see what I'm doing. So, we need an include parentheses and a semicolon, and I'm going to do that same thing. I'll just copy that code and paste it down in the footer area, that's kind of the skeleton of our code for an include. Now, it's simply a matter of putting the name of the file inside a single quote. So headerscuba.php goes in the header area, and footerscuba.php goes in the footer code.

So, I'll put that in a single quote, and then we're going to put header scuba.php. Now, in Dreamweaver CS5 and 5.5, when I add one single quote, it adds another. If you're in an older version of Dreamweaver, you just need to add both of them. This include here, we're going to do the same thing. This one's going to be footerscuba.php, so you can see it's not that difficult to work with includes. We'll save this file, and let's go out to the browser and make sure it's working correctly.

And there it is, now I don't have much space in here for the page content at this point and time, so our page looks rather silly but as we and page content into this middle section it's going to move our content down. If I go out to design view you'll see it looks identical. And I can open this up a little bit to plug in some code here, and let's put it into live view. My page is having a bit of an issue here because my main div is inside and you can see my closing div for that main.

This main is pulling in a page background and a right border property. So, what I need to do if I want everything included in that, I need to move this closing div tag to a different location. So, you do kind of have to coordinate your CSS along with your PHPPs in order to work with it. Let me move things around the way they should be, I want all of my middle content to go within this main div.

I'll move it down there, let me move my footer comment. Now, this if I move it into the PHP code block, notice I get an error, this is actually an HTML comment. So, this comment should go outside our PHP code block. It can get a bit confusing working with comments initially. So, all HTML has to go outside the PHP block. And I'll pull up my P tag, organize this a little bit better.

Let's get that pulled up. This NBSP this is simply a space. So lets see what our page looks like now. I'll Save this, put it in the Browser, and its completely fixed. So, you must coordinate your CSS pieces along with your PHP code and now I won't have a problem as I add content. To test that out, let's put it into deign view and what I will do is add some information in here. Now, you can see clicking around in here is a bit of an issue, I can't get my cursor in this area.

And I want to point this out now, because it's easy to have this occur. I am actually still in Live view, you have to manually move out of Live view, so I can't edit or do anything in the view. If I click Live view again, you can see it has this little bit of shadow. If I click it again, I have no problem getting my cursor inside this area, and you can see as I move my cursor now, I have no problem with my Page Layout.

So I'll Save this page, we will have some extra paragraphs within here. So, let me back that up just a little bit, so we don't have quite so many, when we go to add content. And there's our New Template page, the basis of all of our pages throughout the website.

There are currently no FAQs about Dynamic Dreamweaver Websites: Creating and Validating Forms.

Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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