还是MD5加密码问题???
用户添加及密码可以添加上,并在数据库上显示也加密为MD5.
问题:我做了修改密码页面,但传到数据库的不是MD5加密,,现在该语句怎么写..
(附代码一段)
<!--#include file= "conn.asp "-->
<!--#include file= "md5.asp "-->
<%if session( "ad_admin ")= " " then
response.Redirect "login.asp "
end if%>
<%
sql= "select * from [admin] where id= "&request( "id ")
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,3
rs( "username ")=request.form( "username ")
rs( "password ")=request.form ( "password ")
rs.update
response.redirect "admin.asp "
%>
不知该如何写?
------解决方案--------------------有的MD5还分16和32位的
所以可以这么用
rs( "password ")=MD5(request.form ( "password "),16)