streborr
IS-IT--Management
- Jan 16, 2002
- 98
I'm trying to set up a login page to verify username and password thru a table in a database, if the the username and password are valid I want to send the user to a page that will show information from a database based on what group they're in.
Fields in Table:
user_login_ID, user_name, user_pass, user_group, etc...
Here's my code:
The input fields are from the login page.
and sent to this page.
<body>
<INPUT TYPE="text" NAME="ID" value="<% =Request.Form("login" %>" size="20"></INPUT>
<INPUT TYPE="text" NAME="pword" value="<% =Request.Form("password" %>" size="20"></INPUT>
<%
Set fp_conn = Server.CreateObject("ADODB.Connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset"
fp_conn.Open Application("leadinput1_ConnectionString"
fp_rs.Open "Select * From tblUser Where user_login_ID = '" & Request.Form("login" & "' AND user_pass = '" & Request.Form("password" & "'", fp_conn, 1, 3, 1
%>
<-- this is here just to see if data can be pulled from the DB. -->
<%=FP_FieldVal(fp_rs,"user_group"%>
<%Set fp_conn = nothing%>
<%Set fp_rs = nothing%>
</body>
</html>
Here's the error I received:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_FieldVal'
/members/leadinput1_interface/Results/editor/users/user_login.asp, line 21
Why wont it return the group that this user belongs to?
Fields in Table:
user_login_ID, user_name, user_pass, user_group, etc...
Here's my code:
The input fields are from the login page.
and sent to this page.
<body>
<INPUT TYPE="text" NAME="ID" value="<% =Request.Form("login" %>" size="20"></INPUT>
<INPUT TYPE="text" NAME="pword" value="<% =Request.Form("password" %>" size="20"></INPUT>
<%
Set fp_conn = Server.CreateObject("ADODB.Connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset"
fp_conn.Open Application("leadinput1_ConnectionString"
fp_rs.Open "Select * From tblUser Where user_login_ID = '" & Request.Form("login" & "' AND user_pass = '" & Request.Form("password" & "'", fp_conn, 1, 3, 1
%>
<-- this is here just to see if data can be pulled from the DB. -->
<%=FP_FieldVal(fp_rs,"user_group"%>
<%Set fp_conn = nothing%>
<%Set fp_rs = nothing%>
</body>
</html>
Here's the error I received:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_FieldVal'
/members/leadinput1_interface/Results/editor/users/user_login.asp, line 21
Why wont it return the group that this user belongs to?