<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page language="java" import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
" http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人数字管理系统</title>
</head>
<body>
<%
String username=request.getParameter("username");
String password=request.getParameter("password");
try
{
Class.forName("sun:jdbc:odbc:JdbcOdbcDriver").newInstance();;
String url="jdbc:odbc:pubs";
Connection conn=DriverManager.getConnection(url);
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from denglu where username='"+username+"'and password='"+password+"' ");
if(rs.next())
{ %>
<jsp:forward page="index.jsp"></jsp:forward>
<%}
else
{%>
<jsp:forward page="../like.jsp"></jsp:forward>
<%}
}
catch(Exception e)
{
out.println("wrong!"+e);
}
%>
</body>
</html>