Overriding Principles and Best Practices

Creating The Employee Directory Management System Pages

A Content Management System (CMS) is used to allow you to view/search, add, edit, or delete records from a database.  To make pages more secure a user authentication system can also be implemented.

The Employee Directory table will be created to store information about each employee. If necessary, additional columns can be created later.

The following pages will allow HR to:

  1. ADD employee – create a new record for a new employee that has been hired
  2. VIEW employees – view existing employees records
  3. EDIT employee – update a record for an existing employee when changes are needed
  4. DELETE employee – delete a record of existing employee if he or she leaves
  5. SEARCH for employees – search for records of existing employees

* An employee also can access the View or Search pages if needed.

The following authentication pages will also be created:

  1. Login/Logout – allow users to login to web site / web app
  2. Registration – allow users to register themselves

To recreate a Content Management System (CMS) you typical create a series of template pages that include recordset(s), business logic code with SQL statements, etc. Below is a summary of what is typically needed when creating these templates.

Template Number of  recordset(s) on page Number of record(s) returned SQL Statement SQL Filter
add_employee.php N/A* N/A* INSERT N/A*
index.php (Master/Home) 1 Typically Many SELECT  
detail_page.php 1 1 SELECT WHERE
edit_employee.php 1 1 SELECT AND UPDATE WHERE
delete_employee.php N/A N/A DELETE WHERE
search_employee.php 1 Typically many SELECT WHERE
login_employee.php 1 1 SELECT WHERE
registration_employee.php 1 1 SELECT WHERE
* Not applicable unless you want to dynamically populate form elements

IMPORTANT NOTE: It is important to note that we will be hand-coding the PHP code and not the HTML code—we will let Dreamweaver do that for us. However, you can use whatever editor you wish.