Application functions in ASP applications

xiaoxiao2021-03-06  38

1, often write some system, so generally starting from the login program, you will write a login every time you pick up a system, so troublesome. Simply do a login verification function, for me, most of the situation can be eligible :)

<% Function chk_regist (requestname, requestpwd, tablename, namefield, pwdfield, reurl) dim cn_name, cn_pwdcn_name = trim (request.form ( "" & requestname & "")) cn_pwd = trim (request.form ( "" & requestpwd & "")) IF cn_name = "" or cn_pwd = "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " ") end ifset = server.createObject (" adoDb.recordset ") SQL =" Select * from "& Tablename &" Where "& namefield &" = '"& cn_name &"' "ropen sql, conn, 1 ,1if rs.eof thenresponse .Write ("