Save variable amount of variables from PHP form into database
<p>All,
I'm allowing my user to create questions which I'll need to save answers to. They can create as little or as many questions as they would like. My dilemma is how to save these variables and also retrieve and display them back to the user. </p>

<p>When I output the form to the user I have the following PHP code (I have the questions stored in a different table as well as the answers that are applicable in a different table):</p>

<pre><code>$qryquestion = "Select * from feedback_questions order by question_display ASC";
$resultquestion = mysql_query($qryquestion);
$i=1;
while($resultsetquestion = mysql_fetch_array($resultquestion)){
if ($i%2==0){
    echo '&lt;tr bgcolor="#FFFFFF" id="row'.$i.'"&gt;';
} else {
    echo '&lt;tr id="row'.$i.'"&gt;';
}
echo '&lt;td align="center"&gt;&lt;b&gt;'.$resultsetquestion['question_value'].'&lt;/b&gt;&lt;/td&gt;';
echo '&lt;td align="center"&gt;&lt;div style="text-align:center;"&gt;&lt;input type="radio" name="rating_value_'.$resultsetquestion['question_id'].'" id="rating_value_'.$resultsetquestion['question_id'].'" value="'.$resultsetratings['rating_id'].'"&gt;&lt;/td&gt;';
}
</code></pre>

<p>I was thinking about saving them in the db like the following:</p>

<pre>
user_id     question_id     answer_id    feedback_id
1           1               5            1
1           2               5            1
1           3               1            1
2           1               2            2
</pre>

<p>How would I save these variables from a $_POST perspective when the form gets submitted? </p>
