野
野汉
Unregistered / Unconfirmed
GUEST, unregistred user!
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.sql.*"%>
<jsp:useBean id="cat"
scope="page"
class="access.AccessBean"/>
<%!
ResultSet rs =null;
%>
<html>
<head>
<title>登录窗体</title>
</head>
<body bycolor="#ffffff">
<center>
<%request.setCharacterEncoding("GBK"
String nm = request.getParameter("myname"
String pw = request.getParameter("pwd"
String sql="select * from table1 where name = '"+nm+"'and password = '"+pw+"'";
rs = cat.query(sql);
if(rs.next()){%>
<P>登录成功</P>
<%}else
{%>
<P>登录失败</P>
<%}
rs.close();
%>
<P><a href="B.htm">返回</a> </P>
</center>
</body>
</html>
<%@ page import="java.sql.*"%>
<jsp:useBean id="cat"
scope="page"
class="access.AccessBean"/>
<%!
ResultSet rs =null;
%>
<html>
<head>
<title>登录窗体</title>
</head>
<body bycolor="#ffffff">
<center>
<%request.setCharacterEncoding("GBK"
String nm = request.getParameter("myname"
String pw = request.getParameter("pwd"
String sql="select * from table1 where name = '"+nm+"'and password = '"+pw+"'";
rs = cat.query(sql);
if(rs.next()){%>
<P>登录成功</P>
<%}else
{%>
<P>登录失败</P>
<%}
rs.close();
%>
<P><a href="B.htm">返回</a> </P>
</center>
</body>
</html>