title: Store dynamic form fields in database
body: <p>I have read other answers on this (or at least near to this) subject but I couldn't get a clear view of it so I'm asking for help again.</p>
  
  <p>I have a complex dynamic HTML form that I would like to submit to database using PHP. The form is split into multiple tabs and in each tab I got checkboxes that trigger other parts of the form. Example: at a point in my form I got a checkbox group that has options of: "hotel" and "restaurant". If I check hotels, I get another part of the form displayed, specific for "hotels". Same thing for "restaurant". So it's very dynamic here and I don't know which  would be the best approach for storing every form field in database. Because it could contain 15 fields or 20, depending on the selection. Any example would be appreciated as I'm not that advanced with database design.</p>
  
  <p>Thank you!</p>