Number of form values as posting to one variable and writing it into separate rows in database using PHP ?
<p>I am working on a php project where I have a user and has to undertake a risk assessment - they have to give the hazard type and give it a value of severity and likelihood for all hazards.  I want to then record this in the database as separate rows.  </p>

<p>The columns in database table looks like
<strong>hazard_id, hazard_type, severity, likelihood</strong></p>

<p>The form fields would look like:
<strong>hazard type</strong> (<em>text field</em>), <strong>severity</strong> (<em>drop-down</em>) and <strong>likelihood</strong> (<em>drop-down</em>)</p>

<p>So I would have say 13 repeated lines of the above down the page - all with the same name?
or would you have <strong>hazard_type1</strong>, <strong>hazard_type2</strong> etc</p>

<p>Then I want to post the values to the database so that each hazard shows as different row in the database.</p>

<p>If anyone can help that would be great.</p>

<p>Thanks.</p>
