I am looking for the best method to handle this type of form.
Sorry for the long post.
I need to have a form ask a user many questions and depending on the answers,
ask more questions or display a notes field and then update the database, exit form.
For example:
Question 1 (Yes / No)
if (No) display notes, update database, exit
If Question 1 (Yes), then
Question 2 (Yes / No)
If (Yes) display notes, update database, exit
If Question 2 (No), then
Question 3 (Yes / No)
This goes on for about 10 questions. Also one problem at question 4,
depending on the yes or no answer a different set of questions would be asked for the yes vs the no answer.
I use the form post method $_SERVER['PHP_SELF'] and <select name="q1"> etc...
I have started coding but quickly found that I was using a lot of IF then ELSE statements.
Is there a better way, any suggestions would be greatly appreciated.
Thanks