回 帖 发 新 帖 刷新版面

主题:[讨论]求高手帮忙做登陆页

找个高手帮忙做下登陆页面

现在总出错,不知道哪的毛病,老大们帮帮看看怎么改

现在页面出个这提示


Microsoft JET Database Engine '80040e10' 至少一个参数没有被指定值。 \login.asp, line 37


37行的代码是这个
set rs=conn.execute("select * from  users where user="&user&" and pass='"&pass&"'")  
错误应该就在这段里,老大们帮帮看看吧,

下面是整体页面的代码,



<!--#include file="conn.asp"-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="images/style.css">
<title>会员登录</title>
<script src="images/chanageyzm.js" type="text/javascript"></script>
<script language="JavaScript">
<!--//
function checkadd()
{   
    if (document.postart.name.value.length<1)
{
        alert("请输入用户帐号!");
        document.postart.name.focus();
        return false;
    }
    if (document.postart.pass.value.length<1)
{
        alert("请输入登录密码!");
        document.postart.pass.focus();
        return false;
    }
    if (document.postart.yzm.value.length<4)
{
        alert("请正确填写验证字符!");
        document.postart.yzm.focus();
        return false;
    }
}
//-->
</SCRIPT>
<% 
if request("pass")<>"" then 
user=sqlstr(Request("user")) 
pass=sqlstr(request("pass")) 
set rs=conn.execute("select * from  users where user="&user&" and pass='"&pass&"'")  
if not rs.eof then 
session("loginok")=true 
session("loginname")=user 
response.Write("<script>alert('登陆成功!')</script>") 
else 
response.Write("<script>alert('用户名密码错误!')</script>") 
end if 
end if 
%> 
</head>
<body background="images/background.gif" topmargin="100">
<form action="" method="post" name="postart">
<div align="center">
  <center>
<table border="0" width="280" cellspacing="0" cellpadding="0">
<tr>
<td width="276" colspan="2" height="30">
<p align="center"><font style="font-size:14px"><b>VIP 用户登录</b></font></td>
</tr>
<tr>
<td width="93" height="30">
<p align="right">用户帐号:</td>
<td width="183" height="30"><input name="user" type="text" id="user" size="20"></td>
</tr>
<tr>
<td width="93" height="30">
<p align="right">登录密码:</td>
<td width="183" height="30"><input type="password" name="pass" size="20"></td>
</tr>
<tr>
<td width="93" height="30" valign="top">
<p align="right">验证字符:</td>
<td width="183" height="30"><input type="text" name="yzm" size="20" maxlength="4"><br>请输入字符:<img src="code.asp" id="img_num" valign="middle">  <a href="#">
<font color="#0000FF">更换</font></a></td>
</tr>
<tr>
    <td width="278" colspan="2" height="30">
      <p align="center"><input type="submit" value="登录" name="enter">  <input type="reset" value="取消" name="reset"></p>               
    </td>               
  </tr>      
  </table>      
  </center>   
</div>   
  </form>                
</body>              
</html>

回复列表 (共1个回复)

沙发


select * from  users where user=[color=FF0000]'[/color]"&user&"[color=FF0000]'[/color] and pass='"&pass&"'

我来回复

您尚未登录,请登录后再回复。点此登录或注册