How do I insert the value of this forms in the database?
<tr>
<td>1. Do you feel well and healthy?</label></td>
<input type="hidden" name="question" value="1. Do you feel well and healthy?">
<td><input type="radio" name="answer" value="Yes" checked></td>
<td><input type="radio" name="answer" value="No"></td>
<td><input type="text" name="remarks"></td>
</tr>
<tr>
<td><ul><li>Have any flu or cold?</li></ul></td>
<input type="hidden" name="question" value="Have any flu or cold?">
<td><input type="radio" name="answer" value="Yes" checked> </td>
<td><input type="radio" name="answer" value="No"></td>
<td><input type="text" name="remarks"></td>
</tr>
Because when i'm to insert this data to the database it only inserts the last value which is in the 2nd table row "have flue"....
$medical = new MedicalHistory;
$medical->username = $value;
$medical->question = $data['question'];
$medical->answer = $data['answer'];
$medical->remarks = $data['remarks1'];
$medical->save();
I am using laravel as a framework