Adding User Registration to the Application

Implementing a user registration system is a fairly involved process, not only because there's a lot to do in setting up a user account, but also because it's the first real interaction between the web application and the end-user that we've looked at in this book. The process of accepting user registrations will involve the following:

• Adding navigation so the user can find the registration form

• Displaying the registration form to the user, including a CAPTCHA image

• Accepting and validating the submitted details, including checking availability of user-names

• Displaying errors back to the user if something goes wrong

• Saving the database record, e-mailing the user, and displaying a confirmation page if all went well

We won't do all of this in exactly this order, but we will build up the registration system until it incorporates all of these features.

The fields users will be filling in for registration are as follows:

• A username. This value must be unique and contain only alphanumeric characters (letters and numbers).

• Their name. We will split this up into first name and last name.

• Their e-mail address. We require this so we have a valid point of contact for the user. To ensure that we have a real e-mail address, the account password is automatically generated and sent to this address. This is a simple but effective way of preventing false e-mail addresses from being entered.

0 0

Post a comment

  • Receive news updates via email from this site