I have a survey form with almost 40 text boxes in HTML form.
A user has to fill in all the boxes and submit.
How do I take the survey text box answers in PHP to insert the answers in DB ?
One way is to declare 40 text variables in a loop of 40 (ridiculous option)
<input type=text size='20' maxlength='25' name='survey1'>
<input type=text size='20' maxlength='25' name='survey2'>
.
.
.
<input type=text size='20' maxlength='25' name='survey40'>
How will i relate the QuestionID to the answer then.
I tried this way too:
echo "<input type=hidden name='survey[id]' value=$qid>" ;
echo "Your answer <input type=text size='35' maxlength='40' name='survey[ans]'>" ;
The above will not create an array for me in PHP after submit.
What other options are there for me ?
thanks in advance.
tx.