Hi all,
Lets see if I can manage to phrase this question so it can be understood (its clear in my head but not so sure on paper).
Im busy developing a management system which includes a diary of whos in/out in a week. What Im looking to have is a table displayed on the page with the peoples names down the side and the next 14 days dates across the top, each "cell" would then contain a checkbox to tick for in or nothing if theyre out.
Producing the table shouldnt be a problem however I cant get my head around the update part, ie how do you tell the system to add an entry into the table for each person on the relevant day.
I've made a sample jpeg here
showing the basics of it, I then have a mySQL table called "diary" with 3 columns: unique id, date, personid. With the view to putting an entry in there for each day a persons available (and no entry if theyre not) ie when the Submit button is clicked an entry should be recorded for every personid and date that has a tick in it.
While writing this Im now wondering if this is the best way to do it lol, one question thats just come to mind is, if the box was ticked originally and then you untick it because somethings changed then how do I spot that and delete the original entry?
Oh my god this is way tooooo difficult to explain!!!
If anyone can understand what Ive written and knows the answer then Id be grateful.
Thanks
Peter
Lets see if I can manage to phrase this question so it can be understood (its clear in my head but not so sure on paper).
Im busy developing a management system which includes a diary of whos in/out in a week. What Im looking to have is a table displayed on the page with the peoples names down the side and the next 14 days dates across the top, each "cell" would then contain a checkbox to tick for in or nothing if theyre out.
Producing the table shouldnt be a problem however I cant get my head around the update part, ie how do you tell the system to add an entry into the table for each person on the relevant day.
I've made a sample jpeg here
showing the basics of it, I then have a mySQL table called "diary" with 3 columns: unique id, date, personid. With the view to putting an entry in there for each day a persons available (and no entry if theyre not) ie when the Submit button is clicked an entry should be recorded for every personid and date that has a tick in it.
While writing this Im now wondering if this is the best way to do it lol, one question thats just come to mind is, if the box was ticked originally and then you untick it because somethings changed then how do I spot that and delete the original entry?
Oh my god this is way tooooo difficult to explain!!!
If anyone can understand what Ive written and knows the answer then Id be grateful.
Thanks
Peter