# Features — clientModule

Evidence date: 2026-10-18. Revision: `master` `aa88a34` (2019-06-24).

The source feature list is the three phases in `README.md`. Status below is from that file, `formClient.html`, the PHP pages, and git history.

## Current features

| Feature | Status | Where |
|---|---|---|
| Client create form | Current | `formClient.html` |
| First name, last name, SA ID number | Current | `formClient.html`, inserted by `insertClient.php` |
| Date of birth | Current. Not in the README field list | `birthday` on the form, column `str_dob` |
| Gender radios, female selected | Current | `formClient.html`. Stored `male` or `female` |
| Client type dropdown | Current. Hardcoded three options | `SLA-Software`, `SLA-AWS`, `Technical` |
| Account-active checkbox, checked by default | Current. Not in the README | Checkbox `active` value `Yes`. Absent POST stored as `No` |
| Save and Clear | Current. Clear resets the form. README asked for Cancel | Submit and `type="reset"` |
| Inline `showInput()` preview and alerts | Current. Return value is not used by the button | Script in `formClient.html` |
| HTML `required` on ID, date of birth, and type | Current | Those three controls only |
| Prepared insert of 7 columns | Current | `insertClient.php` |
| Echo of the values just posted | Current. Plain paragraphs, not a table | `insertClient.php` |
| Attempted redirect back to the form after 5 seconds | Current in source. `header("refresh:...")` runs after the echo | `insertClient.php` |
| Full client list | Current | `displayClient.php` |
| Links between the list and the create form | Current | Nav on `displayClient.php` |
| Link from a row to the edit URL | Current as a link. The id is the link text, not a parameter | `displayClient.php` |
| mysqli connection for `localhost`, and for every other server name via the `lamp` default | Current. Duplicated | `dbconnection.php`, `insertClient.php` |
| Page stylesheet | Current | `style.css` |

## Documented and not built

| Feature | README | Code |
|---|---|---|
| GET the fields and POST only the ID number to PHP under `api/` | Phase 1 step 4 | No `api/` directory in history. The form POSTs every field to `insertClient.php` |
| Cancel | Phase 1 field list | Reset control labelled "Clear" |
| Click a row to edit and save | Phase 2 step 2 | `editClient.php` includes the list. The `SELECT` by `int_ID` is commented out. No `UPDATE` |
| Table of client types, add a type, archive a type, link it to the client | Phase 3 | No type table and no archive action at HEAD |

## Present in the tree, not a product feature

| Item | Evidence |
|---|---|
| Smart Admin 2.0 demo (`template/`, 415 tracked files) | Added in `278eb93`. Title in `template/index.html` is "Dashboard | Smart Admin 2.0". No application file references `template/` |
| `print_rr` | Defined in `projectfunctions.php`. Included from `dbconnection.php`. The only call, in `dbconnection.php`, is commented out |
| Commented `mysql_*` insert into `clients` | `dbconnection.php` only. Not executed |
| Row-click script in the list page | Looks up element id `tbl`. The table id is `tblClient`. A PHP assignment inside that script does not read the clicked row |

## Planned

The only written plan is `README.md`. Phase 2 save and phase 3 are still only that list. No issue, branch, or comment describes work after 2019-06-24.

Commented-out SQL and the unused letter regex are inactive code, not a backlog.

## Removed

| Item | Evidence |
|---|---|
| `index.html` | Added while comparing an HTML form with a PHP form (`5770d86`, `#160`). Deleted in `8e401a8` (2019-06-19) after `496401e` recorded that `formClient.html` replaced it |
| `formClient.php` | Added in `cf33369`. The commit subject says the PHP form was preferred. The file echoed `firstName`, `lastName`, and `SAID`, and its form posted to `formClient.html`. Deleted in `6352b3f` (2019-06-24, "formClient.php edited online with Bitbucket", 83 lines removed) |
| Insert into `clienttype` | `32c01e5` (2019-06-20), columns `type`, `said`, `status`, database `client_module` |
| Insert into `tbltype` | `95ee5ba` (2019-06-21), columns `cli_type`, `cli_identityNumber`, `cli_status`, database `db_clientmodule`. Replaced the next morning by the `tbl_client` insert (`eb0b3d4`) |

## Recently changed (end of the git history)

These are the last behaviour changes on `master`, all on 2019-06-24:

| Commit | Change |
|---|---|
| `6352b3f` | Deleted `formClient.php` |
| `eb0b3d4` | Insert moved from `tbltype` to `tbl_client` and gained name, date of birth, and gender |
| `7dc046b` | Insert column order set to the order still at HEAD |
| `7adb18b` | `dbconnection.php` database name set to `db_clientmodule` |
| `cdc9100` | `displayClient.php` added and selects `tbl_client` |
| `978e733` | Table cell padding in `style.css` reduced from 15px to 10px |
| `aa88a34` | `editClient.php` added. List edit link and the non-running row script adjusted. Subject: "can not update directly from php" |

## Deprecated

No file at HEAD marks a feature deprecated. The unused theme, the commented `mysql_*` block, and the commented edit query are the inactive pieces.

`style.css` sets `text-align: centre`. CSS does not define `centre`, so that declaration does not align text. The rest of the rule (10px padding) is what `978e733` changed.
