|
-
Apr 8th, 2003, 01:37 AM
#1
Thread Starter
Hyperactive Member
Help!!
Ok I keep getting a 500 server error... I am new at ASP so someone please tell me what I may be doing wrong here..
Code for my login script... Just FYI - Yes we have a secure certificate, and yes my DB is fine - I have other pages that read from it...
PLEASE HELP!
<%@ Language=VBScript %>
<%
UserName = Request.Form("user_name")
Password = Request.Form("password")
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _
Server.MapPath("\data\data.mdb"))
Dim strSQL, rs
strSQL = "Select User_ID, User_Password From tblUsers " _
& "Where UserName = '"&User_ID&"' And Password = '"&User_Password&"'"
If Not RS.EOF Then
Session("allow") = True
Response.Redirect "https://www.mysite.net/technical_services/admin/"
Else
Response.Redirect "https://www.mysite.net/technical_services/"
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
-
Apr 9th, 2003, 11:26 PM
#2
Hyperactive Member
Your If..Then needs an End If.
And the line with conn.Open(...) will probably need Call before it; so: Call conn.Open(...)
And rs is never assigned anything in the code you posted. so: Set rs = conn.Execute(strSQL)
And in the line:
VB Code:
strSQL = "Select User_ID, User_Password From tblUsers " _
& "Where UserName = '"&User_ID&"' And Password = '"&User_Password&"'"
User_ID and User_Password are not mentioned anywhere so they will always evaluate to an empty string in that line of code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|