Guest_imported
New member
- Jan 1, 1970
- 0
Can anyone see anything wrong with this code?
It keeps giving me "Expected 'End' on the last line of the code: Thanks!
<%
Set orasession = createobject("oracleinprocserver.xorasession"
Set oradatabase = orasession.opendatabase("","*/*",CInt(0))
Set check = oradatabase.dbcreatedynaset("select * from users where user_name='" & Request.Form("username"
&"'",CInt(0))
If Request.Form("username"
= check.fields("user_name"
_
And Request.Form("userpassword"
= check.fields("password"
_
And check.fields("user_type"
= "Student" Then
response.cookies("user"
= check.fields("full_name"
response.cookies("type"
= check.fields("user_type"
Response.Redirect("marvelstudent.htm"
Else If Request.Form("username"
= check.fields("user_name"
_
And Request.Form("userpassword"
= check.fields("password"
_
And check.fields("user_type"
= "Faculty" Then
response.cookies("user"
= check.fields("full_name"
response.cookies("type"
= check.fields("user_type"
Response.Redirect("marvelfaculty.htm"
Else If Request.Form("username"
= check.fields("user_name"
_
And Request.Form("userpassword"
= check.fields("password"
_
And check.fields("user_type"
= "admin" Then
response.cookies("user"
= check.fields("full_name"
response.cookies("type"
= check.fields("user_type"
Response.Redirect("marveladmin.htm"
Else If Request.Form("username"
= check.fields("user_name"
_
And Request.Form("userpassword"
= check.fields("password"
_
And check.fields("user_type"
= "guest" Then
response.cookies("user"
= check.fields("full_name"
response.cookies("type"
= check.fields("user_type"
Response.Redirect("marvelguest.htm"
Else response.redirect("tryagain.html"
End If
OnError response.Redirect ("tryagain.html"
check.Close
orasession.Close
Set orasession = Nothing
%>
It keeps giving me "Expected 'End' on the last line of the code: Thanks!
<%
Set orasession = createobject("oracleinprocserver.xorasession"

Set oradatabase = orasession.opendatabase("","*/*",CInt(0))
Set check = oradatabase.dbcreatedynaset("select * from users where user_name='" & Request.Form("username"

If Request.Form("username"


And Request.Form("userpassword"


And check.fields("user_type"

response.cookies("user"


response.cookies("type"


Response.Redirect("marvelstudent.htm"

Else If Request.Form("username"


And Request.Form("userpassword"


And check.fields("user_type"

response.cookies("user"


response.cookies("type"


Response.Redirect("marvelfaculty.htm"

Else If Request.Form("username"


And Request.Form("userpassword"


And check.fields("user_type"

response.cookies("user"


response.cookies("type"


Response.Redirect("marveladmin.htm"

Else If Request.Form("username"


And Request.Form("userpassword"


And check.fields("user_type"

response.cookies("user"


response.cookies("type"


Response.Redirect("marvelguest.htm"

Else response.redirect("tryagain.html"

End If
OnError response.Redirect ("tryagain.html"

check.Close
orasession.Close
Set orasession = Nothing
%>