Adobe 38040334 - Dreamweaver CS3 User Manual page 668

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Create a database table of registered users (ColdFusion, ASP, JSP, PHP)
You need a database table of registered users to verify that the user name and password entered in the login page are
valid.
Use your database application and a registration page to create the table.
The next step in building a login page is to add an HTML form to the page to let users log in.
See also
"Building a login page (ColdFusion, ASP, JSP, PHP)" on page 660
Add an HTML form to let users log in (ColdFusion, ASP, JSP, PHP)
You add an HTML form to the page to let users log in by entering a user name and password.
Create a page (File > New > Blank Page), and lay out your login page using the Dreamweaver design tools.
1
Add an HTML form by placing the insertion point where you want the form to appear and choosing Form from
2
the Insert menu.
An empty form is created on the page. You may have to enable Invisible Elements (View > Visual Aids > Invisible
Elements) to see the form's boundaries, which are represented by thin red lines.
3
Name the HTML form by clicking the
opening the Property inspector (Window > Properties), and entering a name in the Form Name box.
You don't have to specify an
action
when the user clicks the Submit button. The Log In User server behavior sets these attributes for you.
4
Add a user name and a password text field (Insert > Form > Text Field) to the form.
Add labels (either as text or images) beside each text field, and line up the text fields by placing them inside an HTML
table and setting the table's
border
Add a Submit button to the form (Insert > Form > Button).
5
You can change the label of the Submit button by selecting the button, opening the Property inspector (Window >
Properties), and entering a new value in the Label box.
The next step in building a login page is to add the Log In User server behavior to verify that the entered user name
and password are valid.
Verify the user name and password (ColdFusion, ASP, JSP, PHP)
You must add a Log In User server behavior to the login page to ensure that the user name and password that a user
enters are valid.
When a user clicks the Submit button on the login page, the Log In User server behavior compares the values entered
by the user against the values for registered users. If the values match, the server behavior opens one page (usually
the site's Welcome screen). If the values do not match, the server behavior opens another page (usually a page alerting
the user that the login attempt failed).
In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select User
1
Authentication > Log In User from the pop-up menu.
2
Specify the form and the form objects that visitors use to enter their user name and password.
(ColdFusion) Enter your user name and password if applicable.
3
tag at the bottom of the Document window to select the form,
<form>
or
attribute for the form to tell it where and how to send the record data
method
attribute to 0.
September 4, 2007
DREAMWEAVER CS3
661
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents