Ajax Modals Task Information

Do not reproduct this page, Your page to reproduce can be found here


You are given two tables of information: customers and addresses
See the table at right for details on the table structure
The customers table contains a list of customers
The addressed table contains a list of addresses, each of which is associated with a given customer (addr_cust_id)

There may be multiple addresses per customer, or none.

You each have a folder in /ajaxModalTask with an appropriate database.php.

Take a good look at the proceeding page to make sure you are reproducing its functionality correctly.

Specific expectations:

  • You are only responsible for recreating the content on the linked page above (ie: not this information)
  • You are expected to reproduce the behaviour and styling (just use bootstrap!)
  • You are not expected to load the initial list of customers via ajax - just have the PHP do it when you load the page.
  • You may use as many php files as you want in order to accomplish this task, but index.php should be your entry point
  • One modal should be used, and it should be populated via ajax.
  • Each time a particular address is selected for editing it should make an ajax call to repopulate the modal with the editing form
  • Pay special attention to the titles and buttons of the modals...
  • The work being evaluated here is PHP and Javascript. As a result of Javascript code being exposed to the browser, it has been obfuscated.
  • Assessment:

    • You will be assessed on how closely you reproduce the example.
    • Level marks will be assigned
    • Marks for functionality will be adjusted based on code efficiency, style (spacing, naming, etc) and comments.

Database Information

| Tables your DB |
| customers      |
| addresses      |

customers table
| Field      | Type         |
| cust_id    | int(11)      |
| cust_lname | varchar(255) |
| cust_fname | varchar(255) |

addresses table
| Field        | Type          |
| addr_id      | int(11)       |
| addr_cust_id | int(11)       |
| addr_desc    | varchar(255)  |
| addr_street  | varchar(255)  |
| addr_city    | varchar(255)  |
| addr_prov    | varchar(64)   |
| addr_postal  | varchar(10)   |