I am writing a program (very new at this) and am having trouble figuring out the logic of it. I'm not sure how to program this as far as how to tell the computer what I want it to do. I have an html form for the user to fill out and the data is submitted to a mysql database. The first part I am able to get working - just simple drop down lists and radio buttons. These all have their own fields in the database such as date, employee name, etc. The second part of the form has many, many checkboxes for the user to select what work they completed. There are also drop down lists and a text box associated with each checkbox. For instance, a row consists of "Work Completed", "Machine", "Truck", "Hours". Under each of these headings is a bunch of choices. But if I select, say, "Dig Foundation" under work completed, then the "Machine", "Truck", and "Hours" should be related to that "Dig Foundation" selection. Here are my questions - I think I need to do some sort of array - is that correct? If so, my database should have Work Completed, Machine, Truck, and Hours fields, right? If that is the case, I'm getting confused on how to make sure the program knows which "Machine" field goes with the correct "Work Completed" fields, etc. Otherwise, the only way I know how to do this is to create unique fields for every single checkbox, dropdown, and text box which would make my database huge and my php program would be extremely long and confusing. Thank you in advance for any help - I always struggle with the logic of programming - which makes the actual coding difficult for me!