Accessibility

Table of Contents

Building your first dynamic website – Part 2: Adding user functionality

Understand the data you want to collect

Figure 1 shows the form that you will use to collect feedback from your users.

The form used
to collect feedback

Figure 1. The form used to collect feedback

For each comment you want to capture the following details:

  • The title (or subject) of the comment
  • The actual contents of the comment, that is the description of the feedback/idea
  • The name of the user that submits the feedback
  • (Optional) The e-mail address of the user that submits the feedback
  • The date the feedback was submitted (this is automatically generated, not entered by the user)
  • The status of the comment. To help administrators react to feedback, a status will be assigned to each feedback item. Initially, the status is pending; administrators can change it to planned if the suggestions are useful and will be implemented, or declined if they are not going to be implemented.

This information will be collected in a database. Figure 2 shows some sample data in a spreadsheet.

Sample
feedback

Figure 2. Sample feedback

Databases are structured in a way that is very similar to spreadsheets:

  • Databases consist of one or more tables; spreadsheets consist of one or more worksheets.
  • Tables and worksheets store related information, for example, feedback details.
  • Each row in a table or worksheet represents a record of an item.
  • Columns store detailed information about each record. In the feedback example, this information is the title and contents of the comment, name and e-mail address of the commenter, the time and date of the comment, and its status).

The structure presented as a spreadsheet in Figure 2 exists already in the feedback table of the database that you created in Part 1 of this tutorial.

The database also already contains two feedback records, so you can proceed with displaying feedback items.