Implementing a framework that allows users to register (and log in) is one of the most common tasks for Web developers. Pages in the site are divided into those that are publicly accessible and those that require users to log in. A set of registration and log-in pages allows users to get through the barriers and access the pages requiring authentication. Creating a user authentication framework is the centerpiece of this lesson. Thanks to a series of Dreamweaver server behaviors, creating an authentication framework is much easier than you might think.
In this lesson, you'll create a complete registration and log-in system, taking into account both when things go right and when they go awry.
You might be wondering why Newland Tours would even have user authentication. Newland distinguishes three groups of users: those who first arrive at the site and are determining whether they are interested in Newland Tours; those who are serious about travel and want to learn specific information about certain tours; and those who work at Newland Tours and are authorized to maintain site content. The first group can access the home, about, and contact areas of the site. To access the tour descriptions, country profiles, or tour price calculator, users first need to register to access the site. The registration is free, and Newland Tours only uses the information for marketing and promotional reasonslearning more about the users, and so on. The third group of users has access to the content-management system features of the site. This system, which you'll build later in the book, will enable Newland Tours employees to fill out Web forms to publish new content to the site, without the need to code in HTML or transfer files via FTP.
WHAT YOU WILL LEARN
In this lesson, you will:
Learn about Web applications as entities distinguishable from the collection of pages in the site
Create a registration page
Create a log-in page
Make the log-in page intercept users who have not logged in and are trying to access a restricted page
Ensure that after users log in, they are redirected to the restricted page they tried to access
APPROXIMATE TIME
This lesson takes approximately one hour and 30 minutes to complete.
LESSON FILES
Starting Files:
Lesson13/Start/newland/generic_template.asp
Lesson13/Start/newland/index.asp
Lesson13/Start/newland/profiles.asp
Lesson13/Start/newland/profiles_detail.asp
Lesson13/Start/newland/tour_detail.asp
Lesson13/Start/newland/tourprice.asp
Lesson13/Start/newland/tourprice_processor.asp
Lesson13/Start/newland/tours.asp
Completed Files:
Lesson13/Complete/newland/generic_template.asp
Lesson13/Complete/newland/index.asp
Lesson13/Complete/newland/login.asp
Lesson13/Complete/newland/login_failed.asp
Lesson13/Complete/newland/profiles.asp
Lesson13/Complete/newland/profiles_detail.asp
Lesson13/Complete/newland/register.asp
Lesson13/Complete/newland/registration_failed.asp
Lesson13/Complete/newland/tour_detail.asp
Lesson13/Complete/newland/tourprice.asp
Lesson13/Complete/newland/tourprice_processor.asp
Lesson13/Complete/newland/tours.asp
Lesson13/Complete/newland/_cfapplication.cfm (ColdFusion only)