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"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.cookies("type"
= check.fields("user_type"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Redirect("marvelstudent.htm"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.cookies("type"
= check.fields("user_type"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Redirect("marvelfaculty.htm"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.cookies("type"
= check.fields("user_type"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Redirect("marveladmin.htm"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
response.cookies("type"
= check.fields("user_type"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Redirect("marvelguest.htm"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Else response.redirect("tryagain.html"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End If
OnError response.Redirect ("tryagain.html"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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
%>