登陆代码 挑错 倒插鸡毛
我自己做的一个留言板 不知道那错啦!库名是date 表名是student
<!--#include file="conn.asp"-->
<%
dim sql
dim name
dim password
name=trim(request("name"))
password=trim(Request("password"))
set rs=server.createobject("adodb.recordset")
sql="select * from student where name='" & username & "' and password='" & password &"'"
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
if password=rs("password") then
session("Name")=rs("name")
Response.Redirect "eee.asp"
end if
end if
Response.Write("<script language=""JavaScript"">alert(""用户名或密码错误!!"");history.go(-1);</script>")
rs.close
conn.close
set rs=nothing
set conn=nothing
%>