Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Limiting number of tries in a quiz (ASP not ASP.net)

Reply
Thread Tools

Limiting number of tries in a quiz (ASP not ASP.net)

 
 
bj
Guest
Posts: n/a
 
      04-16-2004
I want to limit the number of tries an individual has at a question in
an online asp quiz to two. I cannot write to the user's hard drive.
I understand that this is possible to do using session cookies (not
that desireable since the powers that be get very nervous with even
the mention of a cookie), session variables or by using the url and
the get/post method of a form. Can someone tell me either (1) how to
do it or, (2) wher to look to see how.

Thanks
bj
 
Reply With Quote
 
 
 
 
Scott McNair
Guest
Posts: n/a
 
      04-16-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (bj) wrote in
news:(E-Mail Removed) m:

> I want to limit the number of tries an individual has at a question in
> an online asp quiz to two. I cannot write to the user's hard drive.
> I understand that this is possible to do using session cookies (not
> that desireable since the powers that be get very nervous with even
> the mention of a cookie), session variables or by using the url and
> the get/post method of a form. Can someone tell me either (1) how to
> do it or, (2) wher to look to see how.


<%
If Request.Form("Attempt")="" Then Attempt = 0 Else Attempt = CInt
(Request.Form("Attempt"))
Answer = Request.Form("Answer")
If Answer = "23" Then Response.Write "Correct!" : Response.End
Attempt = Attempt + 1
If Attempt > 2 Then Response.Write "Sorry! You missed two times." :
Response.End
If Attempt <> 1 Then Response.Write "Sorry, that's the wrong answer.
Try again:<br><br>"
%>
<form method=post action="<%=Request.ServerVariables("SCRIPT_NAME")% >">
<input type=hidden name=Attempt value="<%=Attempt%>">
I'm thinking of a number:
<select name=Answer>
<option value="5">5</option>
<option value="23">23</option>
<option value="55">55</option>
<option value="235">235</option>
</select>
<input type=submit>
</form>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
6500: User-Based Rate Limiting AND Total Rate Limiting Patrick Cervicek Cisco 0 08-07-2007 03:07 PM
[QUIZ] Newbie doubts about the quiz Marcelo Alvim Ruby 15 08-16-2006 02:08 PM
[QUIZ] 1-800-THE-QUIZ (#20) Ruby Quiz Ruby 15 02-24-2005 06:05 AM
[SOLUTION] Ruby Quiz #15 Animal Quiz David Tran Ruby 9 01-21-2005 02:11 AM
[QUIZ] Animal Quiz (#15) Ruby Quiz Ruby 11 01-18-2005 02:42 PM



Advertisments