Project info
I’m developing a LAMP web app, to keep track of gym progress and programs.
A program is a group of sessions.
A session is a group of exercises you do in a specific day of the week (e.g. every Wednesday).
Situation
When a user adds an exercise to a session, he should be able to modify the exercise parameters in the different weeks (e.g. 1st week: 6 reps, 2nd week: 8 reps, 3rd week: 12 reps).
So I thought of a form like this: https://i.stack.imgur.com/3T8Vu.jpg
The exersice table in the DB has a nWeek column.
Problem
How do I differentiate for week the various same-records in the form, so that I can add them to the DB accordingly?
Thoughts
I thought I could add something like “_week1” to the name attribute of every input box while printing them, but I don’t really like this solution, because then I should parse through all of them.