Ok so I have built this form and it contains 3 rows with the same information asked. The user should have the option to fill out one, two, or all three rows.
Upon submission I want each row of form data to be entered into seperate database table rows. Myd DB is MYSQL 5.1.33 and i'm using php5
Here is my form
<form action="insert.php" method="post" >
<td height="63" colspan="5"><h3>Other involvement during high school, college (clubs, sports, work, volunteer, etc.): </h3></td>
</tr>
<tr>
<td width="13%" height="60"><h3>#</h3></td>
<td width="20%"><h3>Activity</h3></td>
<td width="19%"><h3>Position</h3></td>
<td width="23%"><h3>Start Date</h3></td>
<td width="25%" height="60"><h3>End Date</h3></td>
</tr>
<tr>
<td height="63"><label for="InvolvementID"></label>
<input name="ID" type="text" id="ID" size="6" /></td>
<td height="63"><label for="Activity"></label>
<input name="Activity" type="text" id="Activity" size="15" /></td>
<td height="63"><label for="Position"></label>
<input name="Position" type="text" id="Position" size="15" /></td>
<td height="63"><label for="StartDate"></label>
<input name="StartDate" type="text" id="StartDate" size="15" /></td>
<td height="63"><label for="EndDate"></label>
<input name="EndDate" type="text" id="EndDate" size="15" /></td>
</tr>
<tr>
<td height="63"><input name="ID" type="text" id="ID" size="6" /></td>
<td height="63"><input name="Activity" type="text" id="Activity" size="15" /></td>
<td height="63"><input name="Position" type="text" id="Position" size="15" /></td>
<td height="63"><input name="StartDate" type="text" id="StartDate" size="15" /></td>
<td height="63"><input name="EndDate" type="text" id="EndDate" size="15" /></td>
</tr>
<tr>
<td height="62"><input name="ID" type="text" id="ID" size="6" /></td>
<td height="62"><input name="Activity" type="text" id="Activity" size="15" /></td>
<td height="62"><input name="Position" type="text" id="Position" size="15" /></td>
<td height="62"><input name="StartDate" type="text" id="StartDate size=" size="15"15" /></td>
<td height="62"><input name="EndDate" type="text" id="EndDate" size="15" /></td>
</form>
my real problem comes my insert.php document. This is what I have for the insert query and i'm positive that it's wrong. PLEASE HELP
$involv= foreach ($POST['ID']) )
{mysql_query("INSERT INTO Involvement (ID,Activity, Position. StartDate, EndDate)
VALUES ('$POST[ID];''$POST[Activity];','$POST[Position];','$POST[StartDate];','$POST[EndDate];')";