O'Reilly logo

Dreamweaver 8: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tutorial: Authentication

In the tutorial at the end of Chapter 22, you created Web pages that could add, delete, and update records in the National Exasperator database. But you wouldn't want to allow just anyone who visits the Web site to access these pages, let alone delete products from the site. So in this tutorial, you're going to learn how to password-protect these sensitive, mission-critical Web pages.

The following steps assume that you've worked through the tutorial in Chapter 22 and have all of the completed files ready to go. You'll build on them in the following steps.

Building a Login Page

The first step is to create a login page—a simple form with fields for a user name and password. After a successful login from this page, an administrator will be able to access the administration pages:

  1. Open the file login.asp in the admin folder of the site.

    This page will contain the form for typing in an administrator's user name and password. You'll add the form next.

  2. Click in the empty space directly below the headline "Administrator Login." Choose Insert Form Form.

    Dreamweaver adds a red dashed line to the page, indicating the beginning and ending <form> tags.

  3. In the Property inspector, type login as the name of the form.

    While this step isn't required, it's good to get into the habit of assigning your forms descriptive names. Next, you'll add a box for entering a user name.

    Note

    The next steps assume you have the Form Accessibility feature turned on (see Section 10.3). To make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required