beautypg.com

Update the database table of users, Add a server behavior to ensure a unique user name, Building a login page – Adobe Dreamweaver CC 2015 User Manual

Page 675: About login pages

background image

668

Building applications visually

Last updated 6/3/2015

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

The next step in creating a registration page is to add the Insert Record server behavior to insert records in the table
of users in the database.

Update the database table of users

You must add an Insert Record server behavior to the registration page to update the table of users in the database.

1

In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Insert Record from
the pop-up menu.

The Insert Record dialog box appears.

2

Complete the dialog box, making sure to specify the table of users in the database into which the user data will be
inserted. Click OK.

The final step in creating a registration page is to make sure the user name is not used by another registered user.

Add a server behavior to ensure a unique user name

You can add a server behavior to a user registration page that verifies that the user name is unique before adding that
user to your database of registered users.

When the user clicks the Submit button on the registration page, the server behavior compares the user name entered
by the user against the user names stored in a database table of registered users. If no matching user name is found in
the database table, the server behavior carries out the insert record operation normally. If a matching user name is
found, the server behavior cancels the insert record operation and opens a new page (usually a page alerting the user
that the user name is already taken).

1

In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select User Authentication
> Check New Username from the pop-up menu.

2

In the Username Field pop-up menu, select the form text field that your visitors use to enter a user name.

3

In the If Already Exists, Go To box, specify a page to open if a matching user name is found in the database table,
and click OK.

The opened page should alert the user that the user name is already taken and let the user try again.

More Help topics

Build an insert page block by block

Building a login page

Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the
options described in this article in Dreamweaver CC and later. For more information, see

this article

.

About login pages

Your web application can contain a page that lets registered users log in to the site.