标题:谁帮我看一下哪里错了,点提交没反应啊
只看楼主
caiyakang
Rank: 2
等 级:新手上路
威 望:5
帖 子:2111
专家分:0
注 册:2005-3-24
 问题点数:0 回复次数:1 
谁帮我看一下哪里错了,点提交没反应啊
<!--#include file="conn.asp"-->
<%if action="chk"  then
username=request("username")
password=request("password")
set rs=server.CreateObject("Adodb.recordset")
sql="select * from yuaner_admin where username='"&username&"' and  password='"&password&"' "
rs.open sql,conn ,1,1
     if rs("name")<>username and rs("password")<>password then
           response.write("您的输入不正确")
     else   
            session("UserName")=rs("username")
            session("PassWord")=rs("password")
   response.redirect "admin.asp"
     end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
 font-family: Arial, Helvetica, sans-serif;
 font-size: 12px;
 color: #009933;
}
a {
 font-family: Arial, Helvetica, sans-serif;
 font-size: 12px;
}
.an { background-color: #FFFFFF;
 border: 1pt dashed #B9E4B2;
 font-family: "宋体";
 font-size: 12px;
 font-weight: normal;
 color: #58BE47;
 }
.ak {background-color: #FFFFFF;
 border: 1pt double #3399FF;
 font-family: "宋体";
 font-size: 12px;
 font-weight: normal;
 color: #58BE47;
 }
-->
</style>
</head>
<body>
<form name="form1" method="post" action="login.asp?action=chk">
    <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000" class="an">
      <tr bgcolor="#FFFFFF">
        <td><table width="100%" border="0" cellspacing="1" cellpadding="1">
            <tr>
              <td width="33%" align="right" height="30">用户名:</td>
              <td width="67%"><input name="username" maxlength="20" class="ak" size="20">
              </td>
            </tr>
            <tr>
              <td width="33%" align="right" height="30">密 码:</td>
              <td width="67%"><input type="password" name="password" maxlength="16" class="ak"
              size="20">
              </td>
            </tr>
            <tr>
              <td colspan="2" height="15"></td>
            </tr>
        </table></td>
      </tr>
      <tr align="center" bgcolor="#FFFFFF">
        <td height="31"><input type="submit" name="Submit" value="确定" class="ak">
 
      <input type="reset" name="Submit2" value="重写" class="ak">
        </td>
      </tr>
    </table>
</form>
</body>
</html>
搜索更多相关主题的帖子: password request include action where 
2005-09-19 19:14
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
if action="chk"  then

应该是

if Request.Form("action")="chk"  then

应该是这样才对吧?
2005-09-19 22:07



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-28059-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.121727 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved