Admin Login

     
  Username
  Password
     
   
     
     
<% if not isempty(Request.Form("cmdLogin")) then dim vrUserNm, vrPass dim con,rs vrUserNm=Request.Form("txtUserNm") vrPass=Request.Form("txtPass") set con=server.CreateObject("ADODB.CONNECTION") set rs=server.CreateObject("adodb.recordset") dim self self=Request.ServerVariables ("APPL_PHYSICAL_PATH") dim my my="data\dbthattiar.mdb;" dim myself myself=self & my con.ConnectionString= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & myself &"Persist Security Info=False" con.open dim vrLogSt vrLogSt="" rs.Open "Select * from tblCtrl",con,1,3 if rs.RecordCount>0 then do while not rs.EOF if rs("UserNm")=trim(vrUserNm) and rs("Password")=trim(vrPass) then vrLogSt="Y" exit do else vrLogSt="N" end if rs.MoveNext loop end if rs.Close con.Close set rs=nothing set con=nothing if vrLogSt="N" then %> <%elseif vrLogSt="Y" then%> <% end if end if%>