Hi everyone,
Im completing a university project which allows tests to be taken online. The problem is to do with the question generation from the database.
Each test contains 20 questions and i am able to display the first question from the database by setting a variable to 1 (uses a createtest.php then redirects to the test.php) :-
$num = 0;
$_SESSION['QnNumber'] = qn.$num;
(so above is in createtest.php)
This works fine and i have seen the result by echoing the session.
Every time someone answers the question and submits it the page goes to a questioncheck page then redirects using the header function to the test.php again. This then adds one to the session using :-
$_SESSION['QnNumber']++;
$qn = $_SESSION['QnNumber'];
I have also echoed this result to check that it increments and it does, but my problem is that it seems to increment by two and not one everytime the above script is run?!
Has anyone got any ideas why this is?
Thanks
Ash:(
My new web design domain
www.askmultimedia.co.uk