Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.