Loop through a php page until session reaches a certain value
<p>I am currently developing a web based examination. all the question and answers are save on mysql database. I started the system by retrieving and displaying one question together with the answers which is on radio type. i used a session $_SESSION['questionno']=1; to indicate on what question number will be retrieved and displayed. what i want to do next is that whenever the user clicks the next button it will forward informations to result.php and then the said page will add into the session the answer that was retrieved from the previous page at the same time result.php will increment the $_SESSION['questionno']; and then use</p>

<pre><code>echo ("&lt;SCRIPT LANGUAGE='JavaScript'&gt; window.location='/OE/index.php'; &lt;/SCRIPT&gt;");
</code></pre>

<p>to go back to the questions page (index.php) but this time question number two will be displayed because of the incrementation that happened in result.php.</p>

<p>after a series of loops and the user reaches the last question a tally page will then appear.</p>
