Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats Wrong?

Status
Not open for further replies.

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(&quot;oracleinprocserver.xorasession&quot;)
Set oradatabase = orasession.opendatabase(&quot;&quot;,&quot;*/*&quot;,CInt(0))

Set check = oradatabase.dbcreatedynaset(&quot;select * from users where user_name='&quot; & Request.Form(&quot;username&quot;) &&quot;'&quot;,CInt(0))


If Request.Form(&quot;username&quot;) = check.fields(&quot;user_name&quot;)_
And Request.Form(&quot;userpassword&quot;) = check.fields(&quot;password&quot;)_
And check.fields(&quot;user_type&quot;) = &quot;Student&quot; Then
response.cookies(&quot;user&quot;) = check.fields(&quot;full_name&quot;)
response.cookies(&quot;type&quot;) = check.fields(&quot;user_type&quot;)
Response.Redirect(&quot;marvelstudent.htm&quot;)

Else If Request.Form(&quot;username&quot;) = check.fields(&quot;user_name&quot;)_
And Request.Form(&quot;userpassword&quot;) = check.fields(&quot;password&quot;)_
And check.fields(&quot;user_type&quot;) = &quot;Faculty&quot; Then
response.cookies(&quot;user&quot;) = check.fields(&quot;full_name&quot;)
response.cookies(&quot;type&quot;) = check.fields(&quot;user_type&quot;)
Response.Redirect(&quot;marvelfaculty.htm&quot;)

Else If Request.Form(&quot;username&quot;) = check.fields(&quot;user_name&quot;)_
And Request.Form(&quot;userpassword&quot;) = check.fields(&quot;password&quot;)_
And check.fields(&quot;user_type&quot;) = &quot;admin&quot; Then
response.cookies(&quot;user&quot;) = check.fields(&quot;full_name&quot;)
response.cookies(&quot;type&quot;) = check.fields(&quot;user_type&quot;)
Response.Redirect(&quot;marveladmin.htm&quot;)

Else If Request.Form(&quot;username&quot;) = check.fields(&quot;user_name&quot;)_
And Request.Form(&quot;userpassword&quot;) = check.fields(&quot;password&quot;)_
And check.fields(&quot;user_type&quot;) = &quot;guest&quot; Then
response.cookies(&quot;user&quot;) = check.fields(&quot;full_name&quot;)
response.cookies(&quot;type&quot;) = check.fields(&quot;user_type&quot;)
Response.Redirect(&quot;marvelguest.htm&quot;)

Else response.redirect(&quot;tryagain.html&quot;)
End If

OnError response.Redirect (&quot;tryagain.html&quot;)

check.Close
orasession.Close
Set orasession = Nothing

%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top