• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Case Study: Conference Regis... > Supporting a Returning Attendee

Supporting a Returning Attendee

A returning attendee's username and password are submitted from the home page (index.cfm) to the script called login.cfm shown in Listing 15.5. This script's primary job is to check the username and password provided to see whether a matching username and password pair already exist in the Attendees table. The check is done by the query called qLogin. If qLogin's RecordCount property has a value of 1, the user is considered to be logged in and is given cookies called AttendeeID and AttendeeName and a set of hyperlinks that point to the different administration functions. If the RecordCount property is not 1, the login form is regenerated and the user has the chance to try logging in again.

One other task performed by login.cfm is the placement of a cookie that “remembers” the attendee's username if the attendee puts a check in the “Remember Me” check box on the login form. This operation is handled by the first <cfif> tag in the script. The tag checks to see whether a form field named remember is defined and, if it is, a cookie called ConferenceUserName is placed on the attendee's browser. The <cfcookie> tag that places the cookie includes an expires attribute set to the date you want the cookie to expire. If, for example, your conference is on Monday, December 2, and Tuesday, December 3, the expires attribute can be set to 12/4/2002, as shown in Listing 15.5, so that the cookie is eliminated after the conference is over.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint