Hi, I'm wondering how I can go about and how difficult it would be to create a form for users which takes them to a specific page based on the combination of answers they give on multiple questions (yes/no answer questions).
There are 12 different questions, all with the option of yes or no. Once the user has answered all of the questions on the form (which are about personal debt), the website will take them to a page which gives them the appropriate debt advice.
There are 14 different pieces of Debt Advice. Sometimes, depending on how the user answers, all of these pieces of advice will be appropriate and will need to appear on the page which appears after they finish the form. However, if the user answers yes to question 1, this will rule out Debt Advice piece number 5, 8, and 12, and if they answer yes to question 2 then the program will rule out Debt Advice number 2, 7, and 10 (if they answered no then it would not rule these out).
So in this way, the answers they give to the questions will determine the information which will appear on the page that results after they have finished the form.
How would one go about creating/programming such a form?
Any advice or comments would be much appreciated.
10-12-2013, 02:08 PM
Sounds like a job for PHP. Roughly, it would be something like...
Note: The example has only four questions and six paragraphs of advice, but it should be sufficient to show the idea. Also, there is no validatiion of the input, and it only recognises "y" not "Y". So an actual site would need some tidying up.
The page needs to be called something like "debt.php" (not "debt.html") and must be placed on a server that supports PHP code. It may then be called via a shortcut. e.g. If you are testing it on a local host like Wampserver: "target=http://localhost/debt.php".
10-12-2013, 04:58 PM
Thanks a lot for your reply, this is a big help. Much appreciated.