Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Online test

hi,
this is the coding of the page that i have problem. it donot show the next question when i click the next question button.But when i refresh it then it show the question. What's wrong in the coding.





<%

' INCREASES QUESTION NUMBER
if session("cur_question") > 0 then
session("cur_question")=session("cur_question") + 1
else
session("cur_question")="0" + 1
end if
question = session("cur_question")
response.write(question)

test=request.form("subject") ' GETTING SUBJECT FROM USER
response.write(test)

'/////////////////////////////////////////////////////////////////////////////////////////////////////////////

set con=Server.CreateObject("ADODB.Connection")
con.Open"DSN=Online"

'/////////////////////////////////////////////////////////////////////////////////////////////////////////////
' GETTING QUESTION
sql="select * from quest_txt where subjt_id='"&test&"' and quest_no="&question
set rs = con.execute(sql)

'GETTING ANSWERS
ssql="select * from ans_quest where quest_no="&question
set rss = con.execute(ssql)



'/////////////////////////////////////////////////////////////////////////////////////////////////////////////
%>

<%

' HERE QUESTION IS DISPLAYED
response.write(rs("quest_txt"))
response.write("<br>")

' HERE ANSWERS ARE DISPLAYED
while rss.eof=false

%>


"><%=rss("Ans_txt")%>

<%
rss.movenext
wend
%>





Sign In or Register to comment.