Page 1 of 1
THE BEST WAY TO PASS INFORMATION IN A TROUBLESHOOTER
Posted: Fri Aug 29, 2003 1:37 pm
by alcodesign
i am trying to make a troubleshooter where people answer a set of questions and help is presented to them based on these questions. kind of like the windows troubleshooter. i could put a form on one page and have users fill it out, but i wanted something that went step by step to ensure people are doing things correctly. any ideas or suggestions are greatly appreciated.
--AL
Posted: Fri Aug 29, 2003 3:58 pm
by Rook
Code: Select all
<?php
if (!$_POST) {
// show initial drop down box of common problems
} elseif ($_POST['problem'] == 1) {
// show stuff related to problem 1
// or
// show another drop down box of more specific problems related to problem 1
if ($_POST['sub_problem'] == 1) {
// show stuff related to sub_problem
}
} elseif ($_POST['problem'] == 2) {
// show stuff related to problem 2
// or
// show another drop down box of more specific problems related to problem 2
if ($_POST['sub_problem'] == 1) {
// show stuff related to sub_problem
} elseif ($_POST['sub_problem'] == 2) {
// etc...
}
}
?>
Of course that's a very simple structure... you could get into more complex stuff using a database where issues and solutions are indexed and associated with each other.
- Rook.