grantypap
05-08-2007, 05:03 PM
hey guys,
i have a form for a php/mysql based online test.
at present the code calls the questions and their unique ID's and puts the questions in a table and adds the ID as a hidden field.
the problem that i am having is that im not sure how i am going to put the answers back in the DB.
i cant just use the POST method because there may be hundreds of entry's so i was thinking of using 2 arrays, 1 for ID's and 1 for questions.
ie. the first entry in ID_array will match the first entry in QUESTION_array.
this would work fine but for some questions there can be more than one possible answer.
do you think that multidimensional arrays may be the way to go?
if so how would you suggest i implement this?
Cheers,
Grant
i have a form for a php/mysql based online test.
at present the code calls the questions and their unique ID's and puts the questions in a table and adds the ID as a hidden field.
the problem that i am having is that im not sure how i am going to put the answers back in the DB.
i cant just use the POST method because there may be hundreds of entry's so i was thinking of using 2 arrays, 1 for ID's and 1 for questions.
ie. the first entry in ID_array will match the first entry in QUESTION_array.
this would work fine but for some questions there can be more than one possible answer.
do you think that multidimensional arrays may be the way to go?
if so how would you suggest i implement this?
Cheers,
Grant