You can't include index.php into itself. You want to include the question files directly instead.
I'm assuming there's more code after the switch to pull in the files.
What I'm saying is to skip the step of redirecting, and instead include the files directly.
Basically what you are doing is going around in circles 3 times before loading the page.
You get the value from the questions then convert that number to a code, send it onto index.php have it look at the code and decide what file to load and then maybe redirect again or load the file or whatever instead of taking the value directly from the question and loading the file.
In other words loose the redirect which is not really needed if you are already at index.php and just go straight to loading the file.
Code:
switch ($q1) {
case '1':
$page = 'questions/q01_01.inc.php';
break;
case '2':
$page = 'questions/q01_02.inc.php';
break;
}
include($page);
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.