三楼的那是写的什么啊,哪有修改啊,好像就一个新增啊,而且 session("dlpwd1") = UserPass 这个userpass我只看到过一次,从哪里来的啊
<%
If Request("Action") = "post" Then
UserName = Trim(Request("username"))
userpass = Trim(Request("dlpwd1"))
xx = Trim(Request("xx"))
Set Rs = Server.CreateObject("Adodb.RecordSet")
Sql = "Select * From admin Where username='"&UserName&"'"
Rs.Open Sql,Conn,1,3
If Rs.Bof Then
Rs.AddNew
Rs("userame") = UserName
rs("dlpwd1") = UserPass
rs("xx") = xx
rs.Update
else
Rs("userame") = UserName
rs("dlpwd1") = UserPass
rs("xx") = xx
rs.Update
end if
rs.Close
Set Rs=Nothing
Response.Write "<script language='javascript'>alert('修改成功');location.replace('zcxg.asp')</script>"