I have an HTML form and a table inside it. Submit buttons and other lines of code are removed in this preview. Code below.
<form method="post" action="">
<table>
<thead>
<tr>
<th>Days</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td><input name="days[]" type="text"/></td>
<td><input name="price[]" type="text"></td>
</tr>
<tr>
<td><input name="days[]" type="text"/></td>
<td><input name="price[]" type="text"></td>
</tr>
</tbody>
</table>
</form>
Link to the image, how the form with the table looks:

So, whenever I click the submit button, I want to put the data of each column from table to MySQL database.
Then I need to display that data from database in the HTML table that should look like in the image:

I understand how to retrieve data from database and output it in the table, but I can't find out how to insert every table's column data into MySQL database when I click a submit button.