we have initialised the session which does work... We have initialised $ques = 1 so that it displays the first question stored from the database. ok..the exact problem we encounter is that when the user clieck on next question button it should remember the first question using session and the $ques should increment by 1 so that it goes to the next question using the same form and retriving the next question from the database.. the snippet code we have $ques = 1; $sql = "select * from question where QuestionID = $ques"; $rs=mysql_query($sql, $conn) or die( "Could not execute query" ); do { while ($row = mysql_fetch_array($rs)) { echo ("<form action=\"?=SID?\" method=\"post\" >"); echo ("Question $ques: " . $row["Question"]."<br><br>"); echo ("<input type=\"radio\" name=\"Answer\" value=>".$row["Answer1"]."<br>"); echo ("<input type=\"radio\" name=\"Answer\" value=>".$row["Answer2"]."<br>"); echo ("<input type=\"radio\" name=\"Answer\" value=>".$row["Answer3"]."<br>"); echo ("<input type=\"radio\" name=\"Answer\" value=>".$row["Answer4"]."<br><br>"); echo ("<input type=\"submit\" value=\"Next Question\""); echo ("</form>"); } $ques++; } i dont know if do loop will be appropriate for the loop thank u 4 ur help