login.CursorType = 0 login.CursorLocation = 2 login.LockType = 3 login.Open() login_numRows = 0 %> ... ... ... ... ... ...
3. 在注册页面使用 md5
(1) 页首引入md5.asp <!--#include file="md5.asp" -->
(2) 使用command插入记录,插入前对密码加密,注意红色部分代码 ... ... ... ... ... ... <% if(Request.Form("Pass") <> "") then Command_pass = md5(Request.Form("Pass")) %> <% set Command = Server.CreateObject("ADODB.Command") Command.ActiveConnection = MM_qwqw_STRING Command.CommandText = "INSERT INTO Reg (User, Pass) VALUES ('" + Replace(Command_User, "'", "''") + "','" + Replace(Command_pass, "'", "''") + "') " Command.CommandType = 1 Command.CommandTimeout = 0 Command.Prepared = true Command.Execute() Response.Redirect "ok.asp" else Response.Redirect "error.asp" End If %> ... ... ... ... ... ...
总结: 页面中引入md5.asp 然后对目标字符串使用md5()即可. |