一个很简单的代码问题,请高手们帮忙
我的Login.asp 源代码如下,如果成功登陆则转向Myindex.asp(空),数据库内有一个userID = sxj , password = 111的纪录 , 但是我登陆时输入sxj 111,程序不执行,为什么?
<%@ Language=VBScript %>
<%
userID=request("userID")
password = request("password")
if userID<>"" and password <>"" then
set conn = server.CreateObject("adodb.connection")
P1 = "Provider = Mircrosoft.Jet.OLEDB.4.0;"
Path = "Data sourse = " & server.MapPath ("speak.mdb")
conn.Open p1 & Path
Response.Write request("userID")
set rs = server.CreateObject("adodb.recordset")
MySql = "select * from user where userID = userID and password =password "
rs.Open Mysql,conn,1
'Response.Write rs.RecordCount
if rs.RecordCount<> 0 then
session("userID") = userID
Response.Redirect "Myindex.asp"
else
' msgbox "不存在这样的用户或者密码不正确"
end if
else
'msgbox "用户名和密码不能为空",1," 警告"
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY >
<form name = frmLogin method = "post" action = "login.asp">
<table border=0 align=center width="100%" height="100%" cellspacing="0" cellpadding="0">
<TR>
<td align=middle>
<p><b><font color=#786af4 size=5 face="宋体">请您正确登陆后再使用</b></FONT></p>
<table border=0 cellspacing="0" cellpadding="0" height="10%" width="100%">
<TR><td align=center><IMG src="images\manager.gif" ></td></TR></table>
<p></p>
<table border=0>
<tr>
<td ><p ><b><font color=#962424 size = 3>用 户 名:</b></font> <input type =text name =usreID size =15 maxlength = 15 ></p></td>
</tr>
<tr><p></p></tr>
<tr>
<td><p><b><font color=#962424 size = 3>密 码:</b></font> <input type=password name=pwd size =15 maxlength = 15></p></td>
</tr>
<tr><p></p></tr>
<tr>
<td align=center><input type ="submit" name ="Buttonsubmit" value ="确定" class = clsMouseOut></td>
</tr>
</table>
</td></TR>
</table>
</form>
</BODY>
</HTML>
<script language = "VBScript">
Sub ButtonSubmit_OnClick
document.frmLogin.submit
End Sub
</script>
问题可能是出在sql语句上,但是我不知道怎么改,请帮忙