Continue from this topic (php) How can put button to get new inputing field (picture inside).
Now I'm wondering how to get the data and insert it into my database
This is the code I use for the form page
<b><u> Education </u></b>
<form method="post" action="Resume_data_form_2_confirm.php">
<div id="main_wrap">
<div id="clone">
<br>Education Level :
<select name="education[]">
<option value="bachelor" selected="selected">Bachelor Degree</option>
<option value="master">Master Degree</option>
<option value="doctor">Doctoral Degree</option>
</select>
Major : <input type="text" name="edu_major[]" placeholder=''>
Faculty : <input type="text" name="edu_faculty[]" placeholder=''>
<br>
<br>
University : <input type="text" name="edu_university[]" placeholder=''>
Education Hounour :
<select name="edu_honour[]">
<option value="none" selected="selected">None</option>
<option value="cum_laude">Cum Laude</option>
<option value="magna">Magna Cum Laude</option>
<option value="summa">Summa Cum Laude</option>
</select>
Graduated Year :
<select name="year[]">
<?php
$curYear = getdate();
for($year = 1990 ; $year <= $curYear['year']; $year++){
?>
<OPTION value = '<?php echo $year;?>'> <?php echo $year;?> </OPTION>
<?php
}
?>
</select>
</div>
<div style="float:right;">
<input type="button" value="+" id="more" style="float:right;">
</div>
<br>
<br>
<div style="float:right;">
<input type="submit" name="confirm" value="Confirm" style="float:right;">
</div>
</div>
</form>
As you can see, I have a clone function within the code. The question I have is: how can I insert this data into my database.
Suppose that Username is "Test" and Education_ID is auto-incremented, after I click on the "Confirm" button it should be stored in my database like this:
Education_ID(1) Username(2) Edu_Level(3) Edu_Major(4) Edu_Faculty(5) Edu_University(6) Edu_Honour(7) Edu_Graduated_Year(8).
00001(1) Test(2) bachelor(3) IT(4) Computer Science(5) Cambridge University(6) cum_laude(7) 2008(8)
00002(1) Test(2) master(3) IT(4) Science and Technology(5) University of London(6) none(7) 2011(8)