Submit lessons
Posted: Thu May 06, 2010 6:47 pm
Hello. I have a huge confusion on how to do this. I have two tables
Members:
member_id, first_name, last_name
Studies:
study_id, study_name, member_id, times_studied, understanding
Then I have a table in html, where I ask to fill choose from many studies, if the person did that study, how many times have that person studied, and if that person understood. My problem is that I dont know how to do the function in order for it to save the values in the correct way. Im going to show some code to show an example.
When I have to submit this form, I already have the member_id that will be stored with these values. If it was only 1 line I could do it easily, but because there are so many, i really dont know how to do it. If somebody can, please help me!!
Members:
member_id, first_name, last_name
Studies:
study_id, study_name, member_id, times_studied, understanding
Then I have a table in html, where I ask to fill choose from many studies, if the person did that study, how many times have that person studied, and if that person understood. My problem is that I dont know how to do the function in order for it to save the values in the correct way. Im going to show some code to show an example.
Code: Select all
<form action="whatever.php" method="post">
<table>
<tr>
<td>Study Name</td>
<td>Studied?</td>
<td>Times Studied</td>
<td>Understanding</td>
</tr>
<tr>
<td>Study 1</td>
<td><input type="checkbox" name="?" value="?" /></td>
<td><select name="?">
<option name="?" value="?">1</option>
<option name="?" value="?">2</option>
<option name="?" value="?">3</option>
<option name="?" value="?">4</option>
</select></td>
<td><select name="?">
<option name="?" value="?">Understood</option>
<option name="?" value="?">Didnt Understand</option>
<option name="?" value="?">Needs Review</option>
</select></td>
</tr>
<tr>
<td>Study 2</td>
<td><input type="checkbox" name="?" value="?" /></td>
<td><select name="?">
<option name="?" value="?">1</option>
<option name="?" value="?">2</option>
<option name="?" value="?">3</option>
<option name="?" value="?">4</option>
</select></td>
<td><select name="?">
<option name="?" value="?">Understood</option>
<option name="?" value="?">Didnt Understand</option>
<option name="?" value="?">Needs Review</option>
</select></td>
</tr>
<tr>
<td>Study 3</td>
<td><input type="checkbox" name="?" value="?" /></td>
<td><select name="?">
<option name="?" value="?">1</option>
<option name="?" value="?">2</option>
<option name="?" value="?">3</option>
<option name="?" value="?">4</option>
</select></td>
<td><select name="?">
<option name="?" value="?">Understood</option>
<option name="?" value="?">Didnt Understand</option>
<option name="?" value="?">Needs Review</option>
</select></td>
</tr>
etc....
</table>
</form>
When I have to submit this form, I already have the member_id that will be stored with these values. If it was only 1 line I could do it easily, but because there are so many, i really dont know how to do it. If somebody can, please help me!!