用户登陆后修改密码的问题

7415004 2002-07-29 10:35:33
用户登陆后修改密码的问题
edit.asp ----------->
<%session("userid")=userid%>
<%session("userpwd")=userpwd%>
<!--#include file="dbconn.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改密码</title>
<style type="text/css">
td{font-size:9pt}
a:link,a:visited,a:actived{text-decoration:underline;color="#0000ff"}
a:hover{text-decoration:underline;color="#ff0000"}
</style>
</head>
<%
userid=request("userid")
userpwd=request("userpwd")
sql="select * from t_kfqy_user where userid='"+userid+"' and userpwd='"+userpwd+"'"
set rs=conn.execute(sql)
%>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" width="776" cellspacing="0" cellpadding="0" align="center" >
<tr>
<td width="100%" style="padding-left: 30px">
<br>

<form name="form1" method="post" action="editpwdsave.asp?userid=<%=rs("userid")%>">
<table border="0" width="618" cellspacing="1" cellpadding="4" style="border-left: medium none; border-right: medium none; border-top: 1px none rgb(255,188,155); border-bottom: 1px none rgb(255,255,255); margin-left: 16px; margin-top: 10px; padding-left: 4px" bgcolor="#120506" align="center">
<tr bgcolor="#FFFFFF">
<td height="30" colspan="2">
<div align="center">
<center>
<p><font color="#FFFFFF"><b><font color="#FFFFFF"><b><font color="#000000">修改</font></b></font><font color="#000000">密码</font></b></font>
</center>
</div>
</td>
</tr>
<tr>
<td width="107" height="30" bgcolor="#FFFFFF" align="center">
<div align="left">
<p><font color="#000000">用户名:</font>
</div>
</td>
<td width="492" height="30" bgcolor="#FFFFFF" align="center">
<div align="left">
<p><font color="#000000"> <%=rs("userid")%> </font>
</div>
</td>
</tr>
<tr>
<td width="107" height="30" bgcolor="#FFFFFF" align="center">
<div align="left">
<p><font color="#FF0000">*<font color="#000000">新</font></font><font color="#000000">密码:</font>
</div>
</td>
<td width="492" height="30" bgcolor="#FFFFFF" align="center">
<div align="left">
<p>
<input type="password" name="userpwd" size="30">
</div>
</td>
</tr>
<tr>
<td width="107" height="30" bgcolor="#FFFFFF" align="center">
<div align="left">
<p><font color="#FF0000">*</font><font color="#000000">确认密码:</font>
</div>
</td>
<td width="492" height="30" bgcolor="#FFFFFF" align="center">
<div align="left">
<p>
<input type="password" name="pwd_c" size="30">
</div>
</td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF" colspan="2" align="center">
<div align="left">
<p align="center">
<input type="submit" value="修 改" name="submit" style="font-size: 9pt">
       
<input type="reset" value="清 除" name="q" style="font-size: 9pt">
</div>
</td>
</tr>
</table>
</form>
 
<p align="center">
</td>
</tr>
</table>
</body>
</html>

editsave.asp ------------------->
<!--#include file="dbconn.inc"-->
<html>
<head>
<title>修改密码 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
p,td,div{font-size:9pt}
</style>
</head>
<%userid=request("userid")
userpwd=request("userpwd")
pwd_c=request("pwd_c")
sql="update t_kfqy_user set userpwd='"+userpwd+"',pwd_c='"+pwd_c+" where userid='"+userid&"'"
set rs=conn.execute(sql)

%>
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#FF0000">
<p> </p><table border="0" width="200" cellspacing="0" cellpadding="0" style="padding-left: 10px" align="center">
<tr>
<td width="100%" style="padding-left: 30px"><font color="#FF0000" size="+1">修改成功!<br>
<br>
<a href="#" onclick="window.history.go(-1)">点击这里返回!</a></font></td>
</tr>
</table>
</body>
</html>


请问问题出在哪?

...全文
112 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zmy0611 2002-09-09
  • 打赏
  • 举报
回复
1. <%session("userid")=userid%>
<%session("userpwd")=userpwd%>
userid 和 userpwd 沒有付值
2. edit.asp中的
set rs=conn.execute(sql)改為
rs.open sql, conn, 3
3. editsave.asp中的
set rs=conn.execute(sql)一定要有出錯保護
xj1979 2002-09-09
  • 打赏
  • 举报
回复
你应该将提交的东西放在一个form表但里面,如果不是放在一个表但里面,他可能不会提交。
fbj007 2002-09-09
  • 打赏
  • 举报
回复
请问报什么错呀
andyting 2002-09-09
  • 打赏
  • 举报
回复
<%session("userid")=userid%>
<%session("userpwd")=userpwd%>
topfistcn 2002-07-29
  • 打赏
  • 举报
回复
这么多的代码,把错误给出来我们也好找错误呀
lanying 2002-07-29
  • 打赏
  • 举报
回复
错误提示
topfistcn 2002-07-29
  • 打赏
  • 举报
回复
把它的核心挑出来

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧