there are many ways to skin this cat. you can use arrays, full database interaction or some other method. it really depends on what you feel most comfortable with.
the question is: does the survey data change a lot? ie are the questions going to be the same all the time or different? if the answer is yes, then using a database makes sense. if not, then use arrays.
i would arrange the code something like this:
assumptions:
each question has 3 possible answers (item 1 is worth 1 point, item 2 is worth 2 points etc) for a min score of 15 and a max of 45...i based the splits in the results functions on this and arbitrarily grouped those for the results pages
if (!$_POST['submit']){ //submit button not pressed
//call show form function and display the survey
show_form();
}else{
//call the calculate results function
calc_results();
}//end if
//*******************end main code block***********
//
function show_form()
{
//php and html code to show the form
}
//
function calc_results()
{
//get the form data here - could assing each questions values a number and simply sum up those results
//check to ensure that all the values have been input
//if all values ok then continue othewise show the form again with the values previously input
//based on the sum - from above - redirect the user to 1 of your 3 possible pages
if ($x<20){
header("location:results_low.php");
}elseif(21<$x<33){
header("location:results_med.php");
}elseif($x>33){
header("location:results_high.php");
}else{
echo "results did not compute. there must be an error in the inputs";
}//end if
}//end function
there can be all sorts of additional code that might be needed to limit the number of times a person can take a survey (db mechanism needed here), or something else of a security nature.
hth