Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Building a Forum with Dreamweaver – Part 2: Building the Login Page

Building the Login Page

The layout of the login page is already created. You only have to apply the Login Form Wizard:

  1. Open the login.php page in Dreamweaver.
  2. Select and remove the placeholder text (“Login form here”).
  3. Go to the MX Kollection tab of the Insert bar and click the Login Form Wizard icon (see Figure 22).

    Login Form Wizard button

    Figure 22. Login Form Wizard button

  4. This wizard consists of two steps. The first one is purely informative, displaying the settings you made in the Control Panel. Click Next to continue.
  5. In Step 2 configure specific login options (see Figure 23):

    1. To enable users to remain logged in, select the Create “Remember Me” Checkbox option.
    2. To build a page that automatically generates a new password for a user and sends it by e-mail, select the Create “Forgot Password” Page option.Defining login options

      Figure 23. Defining login options

  6. Click Finish to complete the wizard and apply the changes.

The wizard automatically generates the application logic to verify whether the user and the password are correct and whether the account is active. It also generates the forgot_password.php file and a link to it in the login form (see Figure 24).

Login form in Dreamweaver

Figure 24. Login form in Dreamweaver

Save the page and upload it to the server. Make sure you also upload the forgot_password.php file. You can test the login form in your browser to see how it works. If you log in as an inactive user (user name: Angel, password: root), you will receive a warning message (see Figure 25).

Inactive user receiving a warning message

Figure 25. Inactive user receiving a warning message

In the next section, you will create a logout link that safely destroys all session variables.