Im doing a questionnaire website. The amount of questions differ from questionnaire to questionnaire - this is causing me problems:
To fill in a questionnaire im using a for loop to print out the questionnaire to the screen - this works fine, but all the data is in a form, so im creating a string to identify the fields based on the loop - This works fine.
Another page is for processing the data and storing it in the database. I can get the data like: $variable = $_POST['A1'], where A1 is the answer to the first question.
BUT, heres the problem, in the processing page, because the amount of answers to questions im expecting is variable, i cant do as above, i need to loop it somehow. Creating a string bades on the loop and doing: $variable = $_POST['$name'], where $name is the string i have created (A1,A2,A3 etc.) doesnt work.
Im 100% stuck, any ideas????????????