sid,
Thank you for your response!
I don't really understand what you mean by a reusable script or hardcoding.
Also, as each question only has one answer, and the participants may choose not to answer a particular question, would I store the session variables as follows?
Q1 = $SESSION[1]
Q2 = $SESSION[2]
Q3 = $_SESSION[3]
Where do I create the array $_SESSION['answers']?
Lastly, how do I assign the values to the session variables? The only way I can think of is:
switch($q1)
{
case 1;
$_SESSION[1]=1;
break;
case 2;
$_SESSION[1]=2;
break;
case 3;
$_SESSION[1]=3;
break;
case 4;
$_SESSION[1]=4;
break;
case 5;
$_SESSION[1]=5;
break;
case 6;
$_SESSION[1]=6;
break;
default;
$_SESSION[1]="";
break;
}
This seems rather longwinded and messy, especially with over 100 questions. There must be an easier way, right?
Look forward to your reply!
Thanks again!