<% @ Language="JavaScript" %>
<%
var DSN = "DSN=dsnZakat";
var Conn = Server.CreateObject("ADODB.Connection");
Conn.Open(DSN);
var RS = Server.CreateObject("ADODB.Recordset");
var uid = Request.Form("uid");
var pwd = Request.Form("pwd");
var SQL = "Select * From users Where uid = '" + uid + "' And pwd = '" + pwd + "'";
RS.Open(SQL, Conn);
//if the user is found we will set the session okeydokey to TRUE allowing the user to gain entrance
if (!RS.EOF)
{
Session("okeydokey") = "True";
if (RS.Fields("level") == 1)
{
Response.Redirect("menu2.asp");
}
else
{
Response.Redirect("menu1.asp");
}
RS = null;
Conn.Close();
}
else
{
RS = null;
Conn.Close();
Response.Redirect("login.asp");
}
%>
i have tried both methods u gave me but it didn't work...

above is my latest codes that i have tried it failed to check the user level from the database...i have set the uid and pwd in the database as a TEXT and level as a NUMBER...