I'm generating a form with all questions stored in the database. I don't understand how I can prevent the submit button from duplicate itself for every row (question)? I only want one submit button in the end of the form.
// generate all questions
$query = "SELECT * FROM questions";
$result = @mysqli_query($con, $query);
if ($result) {
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$body = $row['question_body'];
$question_id = $row['question_id'];
echo '
<tr>
<form action="insert.php" method="POST">
<td><input type="hidden" name="question_id" value="'.$question_id.'">'.$question_id, $body.'</td>
<td><input type="radio" name="answer_value" value="1"></td>
<td><input type="radio" name="answer_value" value="2"></td>
<td><input type="radio" name="answer_value" value="3"></td>
<input type="submit">
</tr>
</form>
<br/>';
}