回复 2楼 jingjing316
谢谢您的帮助和支持,文件已下载,收藏,多谢!我做了一个简单的修改注册信息页面(zcxg.asp),这是我所想要的最简单的效果,但不成功,修改后的数据无法写入数据库,什么问题我不知道,不怕您笑话,这张页面是我迷迷糊糊蒙出来的,呵呵~~~~~我根本不懂编程语言,一点儿都不懂,所以,您就挑最简单的来,按照我的这个思路帮我修改一下,好吗?
zcxg.asp
<!--#include file="inc/conn.asp"-->
<%
If Request("Action") = "post" Then
UserName = Trim(Request("username"))
dlpwd1 = 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
session("userame") = UserName
session("dlpwd1") = UserPass
session("xx") = xx
session.Update
session.Close
Set Rs=Nothing
Response.Write "<script language='javascript'>alert('修改成功');location.replace('zcxg.asp')</script>"
End If
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改会员注册信息</title>
<style type="text/css">
<!--
.STYLE12 {font-size: 14px}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="?Action=post">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="25" colspan="2" align="center"><span class="STYLE12">修改注册信息</span></td>
</tr>
<tr>
<td width="150" height="25" align="center">用户名</td>
<td><input name="username" type="text" id="username" value="<%=session("username")%>"></td>
</tr>
<tr>
<td width="150" height="25" align="center">密码</td>
<td><input name="dlpwd1" type="password" id="dlpwd1" value="<%=session("dlpwd1")%>"></td>
</tr>
<tr>
<td width="150" height="25" align="center">信箱</td>
<td><input name="xx" type="text" id="xx" value="<%=session("xx")%>"></td>
</tr>
<tr>
<td height="25" colspan="2" align="center"><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</body>
</html>