Forum Moderators: open

Message Too Old, No Replies

Quiz I Done

correct my test

         

cmatcme

4:52 pm on Feb 22, 2005 (gmt 0)

10+ Year Member



Here is a section of the test code:

<form method="post" action="results.asp">
How you been called a geek before?
<input type="checkbox" value="1" name="q"><br>
Do you consider yourself a geek?
<input type="checkbox" value="3" name="q">
</form>

Here is a section of the processing code:

<%
if request ("q") = "string:[0,3]" Then
response.redirect = "example.asp?im=example"
elseif request ("q") = "string:[4,6]" Then
response.redirect = "example.asp?im=example"
end if
%>

I think it's to do with strings that it doesn't work.

It's meant to mean:

if request ("q") = "(CODE FOR 0 TO 3 IN HERE)" Then
...
if request ("q") = "(CODE FOR 4 TO 6 IN HERE)" Then
...

Bascially if q is 0-3 redirect to example.asp.
I don't know how to tell asp about the 0-3 part.

Help please

cmatcme///

aspdaddy

5:15 pm on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use math operators -

if cint(request ("q")) <=3 AND cint(request ("q")) >=0 then