Forum Moderators: open

Message Too Old, No Replies

Cstr Request Variables

Error

         

cmatcme

6:33 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



Here's my code for cstr variable request

--------------------

<%
cstr(request("variable"))

If cstr(request("task")) = "infochoose" Then
response.write "<html> <head> <title>What Have You Lost? </title> </head> <body bgcolor=blue text=blue> <font size=5 color=red> What Have You Lost? </font> <br> <br> <br><table align=center bgcolor=green> <tr> <td> <font size=3>Choose: </font> <br><br><form action='task.asp' align=center> <center><input type='submit' value='Username' name='task'> <br><input type='submit' value='Password' name='task'> <br><input type='submit' value='Email' align=center name='task'> </center></form> </td> </tr> </table> </body></html>"
If cstr(request("task")) = "Username" Then
response.write "<html><head> <title> Please Input Your Password, Full Name And Email </title> </head><body bgcolor=blue text=blue><br><br><br><br><table align=center bgcolor=green><tr><td><form align=center method=post action=http://members.lycos.co.uk/cmatcmextrasignup/view_info/process.php> Password:<br><input type=password name=password><br><br>Full Name:<br><input type=text name=full><br><br>E-mail<br><input type=text name=email><br><input type=submit value=Submit></td></tr></table></body> </html>"
If cstr(request("task")) = "Password" Then
response.write "<html><head> <title> Please Input Your Username, Full Name And Email </title> </head><body bgcolor=blue text=blue><br><br><br><br><table align=center bgcolor=green><tr><td><form align=center method=post action=http://members.lycos.co.uk/cmatcmextrasignup/view_info/process.php> Username:<br><input type=text name=username><br><br>Full Name:<br><input type=text name=full><br><br>E-mail<br><input type=text name=email><br><input type=submit value=Submit></td></tr></table></body> </html>"
If cstr(request("task")) = "Email" Then
response.write "<html><head> <title> You'll Have To Rejoin </title> </head> <body bgcolor=blue text=blue><table align=center bgcolor=green><tr><td><h3>You'll Have To Rejoin</h3><form align=center action=/cmatcme/index.asp><center><input type=submit value=Rejoin name=time></center></form></body></html>"
End If
%>

-----------------

And here's the error it brought up

-----------------

Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/cmatcme/task.asp, line 12

-----------------

But on line 12, 'End' is there!

Please help

dotme

6:47 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



See bold for the fix :-)

If cstr(request("task")) = "infochoose" Then
response.write "<html> <head> <title>What Have You Lost? </title> </head> <body bgcolor=blue text=blue> <font size=5 color=red> What Have You Lost? </font> <br> <br> <br><table align=center bgcolor=green> <tr> <td> <font size=3>Choose: </font> <br><br><form action='task.asp' align=center> <center><input type='submit' value='Username' name='task'> <br><input type='submit' value='Password' name='task'> <br><input type='submit' value='Email' align=center name='task'> </center></form> </td> </tr> </table> </body></html>"
ElseIf cstr(request("task")) = "Username" Then
response.write "<html><head> <title> Please Input Your Password, Full Name And Email </title> </head><body bgcolor=blue text=blue><br><br><br><br><table align=center bgcolor=green><tr><td><form align=center method=post action=http://members.lycos.co.uk/cmatcmextrasignup/view_info/process.php> Password:<br><input type=password name=password><br><br>Full Name:<br><input type=text name=full><br><br>E-mail<br><input type=text name=email><br><input type=submit value=Submit></td></tr></table></body> </html>"
ElseIf cstr(request("task")) = "Password" Then
response.write "<html><head> <title> Please Input Your Username, Full Name And Email </title> </head><body bgcolor=blue text=blue><br><br><br><br><table align=center bgcolor=green><tr><td><form align=center method=post action=http://members.lycos.co.uk/cmatcmextrasignup/view_info/process.php> Username:<br><input type=text name=username><br><br>Full Name:<br><input type=text name=full><br><br>E-mail<br><input type=text name=email><br><input type=submit value=Submit></td></tr></table></body> </html>"
ElseIf cstr(request("task")) = "Email" Then
response.write "<html><head> <title> You'll Have To Rejoin </title> </head> <body bgcolor=blue text=blue><table align=center bgcolor=green><tr><td><h3>You'll Have To Rejoin</h3><form align=center action=/cmatcme/index.asp><center><input type=submit value=Rejoin name=time></center></form></body></html>"
End If