Having a form as below, what should I do to my database or how should I structure my database so that for instance, a particular user will have all the three entries attached to him:
**********************************************************
<html>
<form action="processForm2.php" method="post">
<p>First Entry</p>
<div id="original">
<select name="subject[]">
<option>English</option>
<option>Mathematics</option>
<option>Physics</option>
<option>Chemistry</option>
<option>Biology</option>
</select>
<select name="grade[]">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<select name="year[]">
<option>2012</option>
<option>2011</option>
<option>2010</option>
</select>
</div>
<p>Second Entry</p>
<div id="original">
<select name="subject[]">
<option>English</option>
<option>Mathematics</option>
<option>Physics</option>
<option>Chemistry</option>
<option>Biology</option>
</select>
<select name="grade[]">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<select name="year[]">
<option>2012</option>
<option>2011</option>
<option>2010</option>
</select>
</div>
<p>Third Entry</p>
<div id="original">
<select name="subject[]">
<option>English</option>
<option>Mathematics</option>
<option>Physics</option>
<option>Chemistry</option>
<option>Biology</option>
</select>
<select name="grade[]">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<select name="year[]">
<option>2012</option>
<option>2011</option>
<option>2010</option>
</select>
</div>
</form>
</html>
*************************
To submit my data to the database in mysql, I tried using a table "course" in a database with the respective numbers of Columns "email"(Primary key), "subject", "grade", "year". It complained of duplicate entries (Primary key). But when I changed the structure of the "course" table to "Id_no"(Primary key), "subject", "grade", "year", the data was submitted. But herein lies the big question? How do I associate the three entries to that one particular user using his email or his user ID???
PLEASE YOUR HELP WILL BE APPRECIATED!