Howdy, Stranger!

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

Categories

Online test

nomi85nomi85 Member Posts: 7
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
%>





Comments

  • Justin BibJustin Bib USAMember Posts: 0

    __ | http://forcoder.org | free video tutorials and ebooks about || Perl, C#, Visual Basic, Go, Java, Visual Basic .NET, MATLAB, PL/SQL, JavaScript, C, Scratch, PHP, C++, Objective-C, Delphi, R, Python, Swift, Ruby, Assembly Dart, Ada, ML, D, Crystal, Apex, Rust, F#, Logo, LabVIEW, Prolog, Erlang, ABAP, SAS, COBOL, Scheme, Lua, VBScript, Bash, Hack, Lisp, Fortran, Awk, Kotlin, Alice, Transact-SQL, Clojure, Scala, Julia, FoxPro || ________

Sign In or Register to comment.