Before you start building this application, make sure you have a correctly configured Dreamweaver site, and a working database connection. For more instructions regarding these actions, consult the Getting started help file, which can be found in Help -> InterAKT -> Getting Started.
Through the tutorial, you will have to create several files and folders in your site's root. You can create them at the very beginning, so that you will not waste time with this operation again. To create files and folders in the site's root, use the corresponding options in the File menu of the Files tab.
The file structure will look as in the example below, and you can create
it easily by unpacking the zip file corresponding
to your server model from \tutorials\Contact Management
Application\ in your site root:
After having created the files for your pages, it is time to set up
the database that will hold the information to display. For this tutorial,
you will use two tables: one for the companies, and one for the contacts.
The field names are shown in the following image:
Note: The database diagram in the image above was built with MX Query Builder (also referred as QuB) to better illustrate the database structure. You do not need to build it in order to complete this tutorial.
Here are the database tables and their columns:
company_com - the company
table stores one entry for each registered company.
· id_com
- the primary key
for the company table. No two companies will have the same ID.
· name_com
- the company name (Amazon, Best Buy etc.).
· address_com
- this field stores the address of the company, (ex: 123 Main St., Chicago,
IL).
contact_con - the contact
table stores a list of contents for each company. It is linked to the
company table by the idcom_con foreign key,
which stores the id of the company associated to each contact record.
· id_con
- the primary key for the contact table. No two contacts will have the
same ID.
· idcom_con
- the foreign key containing the company id (id_com).
· name_con
- the contact name (Bill Jones, Jason Smith etc.).
· job_con
- the job or position of each contact (Developer, Manager etc.).
· email_con
- the email address of the contact.
· phone_con
- contact's phone number.
· birthday_con
- contact's date of birth.
You can find the scripts needed to create an identical table structure inside the downloaded package, in the \tutorials\Contact Management Application\db\ folder, as an sql or mdb file, depending on the database server you intend to use. Import them in your database server management software (e.g. PHPMyAdmin, Microsoft Access etc.).
Open the main index page and create a new connection named connContacts and configure it to connect to your newly created database.
Note: If using the package provided
files, you must replace the existing database connection, user name and
password from the connection already created with your particular data.
Once the connection is configured, you can move on to the next section, where you will create the pages for displaying, adding, editing, and deleting companies and contacts.