<!--#include file="webconn.asp"-->
<%
pwd=server.HTMLEncode(trim(request.Form("pass")))
wname=server.HTMLEncode(trim(request.Form("name")))
if pwd="" or wname="" then 
response.write "<script>alert('请填写相关信息!');history.go(-1);</Script>"
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from member where u_user='"& wname &"' and u_pwd='"& pwd &"'"
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
	session("user")=wname
	response.Redirect("index.asp")
else
response.write "<script>alert('用户名和密码错误!');history.go(-1);</Script>"
rs.close
set rs=nothing
end if
end if
%>