[thelist] ASP - Login Validation
Ryan Owen
rynographics at hotmail.com
Wed Apr 10 22:04:00 CDT 2002
Hey ... I am clueless on this one and I am sure there is a simple mistake
that I just can't see. I don't know a lot of ASP but any help would be
great.
Here is a link to the problem
http://www27.brinkster.com/ryno/login2.asp
A successful userid and password is Hector and purple
Here is the page I am having problems with ...
//<%@Language="javascript"%>
//<%
//var LoginID = String(Request.Form("userid"));
//var Password = String(Request.Form("password"));
//var strConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="
+
Server.MapPath("\\ryno\\db\\dbWebsite.mdb");
//var cn = Server.CreateObject("ADODB.Connection");
//cn.Open(strConnectionString);
//var strSQL = "SELECT fldPassword FROM tblUser WHERE fldLoginID = '" +
LoginID + "'";
//var rs = Server.CreateObject("ADODB.Recordset");
//rs.Open(strSQL, cn);
//if (!rs.EOF) {
//if (Password == rs("fldPassword")) {
//Session("name") = LoginID;
//Session("valid") = true;
//Response.Redirect("home1.asp");
//}
//else
//{
//Response.Redirect ("login2.asp?notvalid=no");
//}
//}
//else
//{
//Response.Redirect ("login2.asp?notvalid=no");
//}
//rs.Close();
//rs = null;
//cn.Close();
//cn = null;
//%>
Thanks again
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
More information about the thelist
mailing list