Survey Flash file

okay, here we go

so for all of you who have myspaces, you see bulletins with surveys that people do
you read them, almost everyone with a different amount of questions

i would like to make a flash file

in the flash file it would have a text box for a question and then an input field for the persons answer
it would have one for every question

after the person fills out all of the questions there would be a question at the bottom and when clicked, would copy the html code plus the persons answers to each question

now as i said before, each survery has a different amount of questions
so on my server i would have a text file and each line would have a different question, which the flash would take and insert into one of the text fields for a question
but i couldn make a flash file with a set amount of text boxs for question and answers

so maybe on my txt file the first line could be a number
for example 40
and that would mean there would be 40 questions in the survey and the flash file could make 40 input fields and answer text box
and then each line would be a question

so for example
line 1 would be the number of questions
line 2 would be the first question in the survey
line 3 would be the second question in the survey
line 4 would be the third question in the survey
line 5 would be the fourth question in the survey
line 6 would be the fifth question in the survey
and so forth and so on

is this possible?
how could i do it!?
im sure i would need maybe a php file
but not sure what the code would be and the actionscript

thanx for your help in advance!