I'm not even sure if it's the correct tag I want to be using.
Anyway ...
I have a form that is dynamically generated ...
Say I choose to have 3 answers it will generate 3 input text fields named "form_answer1" through "form_answer3"
And what I want to do is insert this into a database.
But I can't get it to work ... here's the code I'm trying:
$i = 0;
while($i < $count) {
$answer_content = eval("form_answer" & $i);
$sql_insert = "INSERT INTO polla (pollid,answer) VALUES ('$pid','$answer_content')";
$execute_insert = mysql_query($sql_insert);
$i++;
}
Basically I'm trying to dynamically generate whatever was inputted into the "form_answerWHATEVERNUMBER"