title: Insert HTML form data to mySQL via PHP (form array vary from amount of table rows)
body: <p>I have a HTML form where users can checkmark up to 50 different questions. They have to checkmark minimum 1 and at the most all 50 questions. <br> </p>
  
  <p>After they submit the form I need to insert the data (<code>form_array</code>) to my mySQL table <strong>questions</strong>. The table contains of <strong>50 questions</strong> rows (see below <strong>question table</strong> ex.). </p>
  
  <p>I know the <code>INSERT INTO 'questions' (question1, question2, question3, question4,....question50) VALUES (value1, value2, value3...)</code>, but my challenge is that since the amount of checked questions (values) can vary in the form, I do not know how to insert the <code>form_array</code> to my <strong>questions</strong> table. </p>
  
  <p><em>The <strong>questions</strong> are inserted as <strong>true</strong> or <strong>false</strong> in the <code>form_array</code> depending on if they are marked or unmarked in the html form.</em> </p>
  
  <p>The <strong>questions</strong> table has a primary auto incremented ID and 2 foreign keys besides the 50 questions. </p>
  
  <p>I welcome all suggestions/examples on how to insert an array with the above scenario?</p>
  
  <p><strong>The <em>question</em> table will look like this:</strong></p>
  
  <pre><code>  `question1` tinyint(1) NOT NULL,
    `question2` tinyint(1) NOT NULL,
    `question3` tinyint(1) NOT NULL,
    `question4` tinyint(1) NOT NULL,
    `question5` tinyint(1) NOT NULL,
    `question6...etc etc...up to 50 questions
  </code></pre>