Problem

1. Senior Member
Join Date
Dec 1969
Posts
159

## Problem

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## RE: Problem

3. Senior Member
Join Date
Dec 1969
Posts
159

## RE: Problem

I only want to display a link when a question is wrongly answered.

4. Senior Member
Join Date
Dec 1969
Posts
96,118

If Trim(userAnswer & "") = Trim(correct & "") Then <BR> score = score + 1 <BR>%&#062; <BR> For question &#060;%=qnum%&#062;, &#060;%=qtext%&#062;, you got the correct answer.&#060;br/&#062; <BR>&#060;% <BR>Else <BR>%&#062; <BR> For question &#060;%=qnum%&#062;, &#060;%=qtext%&#062;, you answered &#060;%=answers(userAnswer)%&#062;, but the correct answer was &#060;%=answers(correct)%&#062;.&#060;br/&#062; <BR> [hl="pink"]So if you put something right here, don&#039;t you imagine[/hl]<BR> [hl="pink"]that it, too, will only appear when the answer was wrong?????[/hl]<BR><BR> [hl="yellow"]Of course, this next line is completely bogus...[/hl]<BR> [hl="yellow"]You will be inserting one new record into the SCORES[/hl]<BR> [hl="yellow"]table each time somebody gives a wrong answer.[/hl]<BR> [hl="yellow"]So if they get questions 1,3,5,7,9 wrong and others right,[/hl]<BR> [hl="yellow"]You will insert scores of 0,1,2,3, and 4![/hl]<BR> [hl="yellow"]On top of that, you don&#039;t identify *who* got the score![/hl]<BR> &#060;% conn.Execute "Insert Into Scores (score) Values(" & score & ")" %&#062; <BR><BR>&#060;% <BR>End If <BR>...<BR>

5. Senior Member
Join Date
Dec 1969
Posts
159

6. Senior Member
Join Date
Dec 1969
Posts
96,118

## Well...

http://www.aspmessageboard.com/forum/asp.asp?M=556213&F=20&P=1<BR><BR>Isn&#039;t what you just posted 100% identical to what I said in that message?<BR><BR>*******************<BR><BR>I don&#039;t know *what* you should do with that line.<BR><BR>If you don&#039;t care WHO scored WHAT, then why are you putting the scores into the DB?<BR><BR>But, yes, at a minimum you need to move that to *AFTER* the <BR> Loop<BR>line.<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•