New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

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

Dynamic Dreamweaver Websites: Creating Login Areas
Illustration by

Displaying variables


From:

Dynamic Dreamweaver Websites: Creating Login Areas

with Candyce Mairs

Video: Displaying variables

I now have a page called Creative Variables, and this page was built in the Create Variables movie, and what we want to do is display information on the page. So right now, if I put this in the browser, nothing is displayed. The space is created in computer memory. Those values are stored. Now, how do we get them onto the page? Well, what were going to do is use a command in PHP that tells PHP to write to the page and that command is Echo.
Expand all | Collapse all
  1. 1m 32s
    1. Welcome
      1m 32s
  2. 2m 57s
    1. Course overview
      1m 16s
    2. The course environment
      1m 41s
  3. 26m 58s
    1. Static vs. dynamic requests
      4m 8s
    2. Installing XAMPP on a Windows system
      8m 54s
    3. Installing MAMP on a Mac system
      4m 29s
    4. Using admin consoles
      3m 54s
    5. Installing the course files
      5m 33s
  4. 18m 36s
    1. Overview of the Dreamweaver interface
      6m 22s
    2. Setting up the course site
      6m 20s
    3. Previewing pages
      5m 54s
  5. 33m 38s
    1. Creating PHP pages
      5m 45s
    2. Adding PHP code
      5m 44s
    3. Displaying variables
      4m 45s
    4. Commenting your code
      5m 30s
    5. Working with includes
      5m 58s
    6. Building the course templates
      5m 56s
  6. 35m 13s
    1. What is a database?
      5m 2s
    2. Adding database tables
      7m 34s
    3. Connecting to the database
      8m 28s
    4. Getting data from a database: Part one
      8m 25s
    5. Getting data from a database: Part two
      5m 44s
  7. 1h 16m
    1. Planning the login process
      7m 25s
    2. Creating a login form
      7m 45s
    3. Adding form validation: Part one
      9m 22s
    4. Adding form validation: Part two
      1m 37s
    5. Exploring the registration page
      7m 17s
    6. Correcting table fields
      6m 1s
    7. Setting up the login landing page
      4m 1s
    8. Using server behaviors
      3m 36s
    9. Inserting new members
      8m 48s
    10. User authentication
      10m 3s
    11. Restricting access to pages
      5m 17s
    12. Testing the login
      4m 53s
  8. 1h 6m
    1. Admin area overview
      5m 9s
    2. Adding new users
      5m 19s
    3. Restricting access
      12m 25s
    4. Planning the admin update area
      5m 19s
    5. Building the members table listing
      6m 55s
    6. Building the querystring
      9m 14s
    7. Populating the update form
      6m 33s
    8. Updating the database data
      11m 28s
    9. Testing the admin update process
      3m 47s

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 Login Areas
4h 21m Intermediate Jun 06, 2011

Viewers: in countries Watching now:

An important but little-understood concept in dynamic web development is that of role-based logins, which allow different types of users to access different parts of the site. In this course Adobe Certified Expert Candyce Mairs shows how to use Dreamweaver's features to create role-based logins, restrict page access, build an administrator area, and test everything to make sure it works. Plus, see how to set up a development environment and work with a database from within Dreamweaver. Along the way, build your skills in areas like working with PHP, adding form validation, using server behaviors, and much more.

Topics include:
  • Installing XAMPP on a Windows system
  • Installing MAMP on a Mac system
  • Using admin consoles
  • Previewing pages
  • Working in PHP
  • Adding database tables
  • Getting data from a database
  • Building the login area
  • Planning the admin update area
  • Testing the admin update process
Subjects:
Developer Web Web Design Web Development video2brain
Software:
Dreamweaver
Author:
Candyce Mairs

Displaying variables

I now have a page called Creative Variables, and this page was built in the Create Variables movie, and what we want to do is display information on the page. So right now, if I put this in the browser, nothing is displayed. The space is created in computer memory. Those values are stored. Now, how do we get them onto the page? Well, what were going to do is use a command in PHP that tells PHP to write to the page and that command is Echo.

And what I'm going to do is say Echo, dollar, hello. Now, notice in my code hints that pop-up because I created this variable up here, Dreamweaver understands that variable has been created. This is another, new CS5 and 5.5 feature. And I can work with it that way. I'm also going to say dollar sign world. Once it's showing, I hit Enter or Return, add my semicolon, and that should display our information.

Let's check it out. Now, this is saying there's a syntax error on our page, so let's take a look at what it does in the browser. And you can see, there is definitely a syntax error in our code, and these are not the easiest to understand in terms of what it is PHP wants you to do. However, you can kinda start reading some of these. It looks like it's expecting something. Well, we know that there's a semicolon at the end of the line. What's wrong with this piece is the quote feature.

Let's see what happens if we add double quotes. And now it says, no syntax error. So, even though, it's a variable. We still, in order for PHP to be happy, we must put anything after Echo inside of double quotes and you can see my name is being printed. Now, what if I want to change these values? I don't want it to be my specific name, I want it to say, Hello World, once again.

I'll change the value. The value is on the right-side of the equal sign. So this is the information that goes inside that drawer is going to change. But I don't need to change this line in order to do that. So I'll Preview. Now, it says Hello World. So the value is being displayed whatever the value is at that point in time. And that's the basis of all variables in any type of language. Be it client-side language, server-side language, programming language or scripting language.

A variable exists in all of those, so anytime you want to display a variable Echo is what you tell PHP. Now, we used the code block here in the PHP tab to create the code block. Let me show you another feature Dreamweaver has. And I'm going to put it into a separate code block, because I want to show you this complete piece. Just to the right of the code block is Echo, but when you use Echo, it prints out the opening and closing PHP code block plus it says Echo.

And when you go to do this, I click withed my cursor. Let me show you. See how the cursor is right in the spot where you can start typing. So this Echo is a little bit more complete. If you need to output information to the page, this adds the code block and the word Echo and adds the space. So, all you have to do is click that, and start typing what you want to put in here. Now, get rid of those, you can see the red error. It isn't happy, because there's a word, Echo, and just like up here, we don't have the double quotes on each side of what we want to display.

So that is how you display a variables in PHP. Now, that concept transfers whether I want to display it in a table, whether I want to just split it in the middle of a sentence. It doesn't matter. In the middle of a form field. Echo is how you tell PHP print this out to the page. You can think of it like printing it as HTML. So that is displaying a variable in PHP.

There are currently no FAQs about Dynamic Dreamweaver Websites: Creating Login Areas.

 
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.
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.

join now 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 Login Areas.

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
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.

Are you sure you want to delete this note?

No

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.