标签:user username parse rom int amp rac unicode password
<%@ page language="java" import="java.util.*" import="java.sql.*" pageEncoding="UTF-8"%> <% String driverName="com.mysql.jdbc.Driver"; String dbName="MyLogin"; String userName="root"; String userPwd="5201314"; String url1="jdbc:mysql://localhost:3306/MyLogin"; String url2="?user=root&password=5201314"; String url3="&useUnicode=true&characterEncoding=UTF-8"; String url=url1+url2+url3; Class.forName(driverName); Connection conn=DriverManager.getConnection(url); int Cname=Integer.parseInt(request.getParameter("idhao")); int Cpassword=Integer.parseInt(request.getParameter("userpassword")); String Cn="select num from checklog where id=‘"+Cname+"‘"; Statement stmt=conn.createStatement(); ResultSet rs=stmt.executeQuery(Cn); if(rs.first()){%>标签:user username parse rom int amp rac unicode password
原文地址:http://www.cnblogs.com/jgrs/p/7732511.html