I need a page that will automatically creates a table.
The 1st column will be the retrieved from 1 table called 'units'.
Depending on how many records are in the table 'years' will have on the rest of the columns (eg: UNIT NAME, YEAR1, YEAR 2, YEAR 3, etc)
The rows are generated from the table 'units'.
The cells inside the table are checkboxes. If you tick or untick a checkbox it will use jquery and update the field 'enabled' in the table called 'unit_toggle' using mysql.
This table includes: toggleid, unitid, yearid, enabled.
I have attached an example of what the table should look like. On acceptance of the project, I will provide the the code I have done already (the layout etc) plus the mysql tables.