<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<%
if(Request("Submit")=="提交"){
	rs=Server.CreateObject("adodb.recordset"); //rshy为会员表的记录集
	sql="select * from tab where name='" + Request.Form("name") + "'";	//将用户名密码的表单内容与数据库进行核对
	rs.Open(sql,conn,1);	
	if(rs.BOF && rs.EOF){ //如果按用户名和密码双重条件不能取出记录，则
		Session("ses") = "err";
		Response.Redirect("Session2.asp");
	}else{
		Session("ses") = "ok"; 
		Response.Redirect("Session2.asp");
	}
}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Session1</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  用户名
  <input name="name" type="text" id="name" />
  <input type="submit" name="Submit" value="提交" />
</form>
</body>
</html>
