I have a lot of text fields, checkboxes and drop down menus. I have two fields that are required and I have that validate and it is put into my db. However, there are other checkboxes that when you click on them I want to be able to validate that information and put that info with the two required fields into the database. What is the best way to validate and put the information into the db without knowing what the user is going to select? There are like four other sections that if they select it then I need to validate that info and put that info as well as the original two fields in the db.
I am using isset to check if the checkmark is set. I was thinking of checking if all 4 checkboxes are selected like if isset(check1 && check2 && check3 && check4) then validate it all and put into db. Then do if isset(check1 && check2 && check3) then validate and put in db...would that work or is there a better way?
I think my problem lies when I go to insert it into the db because I have to specify what to put in there and what columns but then the user wouldn't be putting anything in there...prob doesn't matter that it is blank anyway right? Any suggestions?