public int checkLogin(String loginID, String loginPW ) {
		int result = 0;
		String sql = "select * from user WHERE `ID`=?";
		
       	try {
       		con = getConnection();
        	pstmt = con.prepareStatement(sql);
        	
        	pstmt.setString(1, loginID);
        	
			rs = pstmt.executeQuery();
			
			while (rs.next()) {
				if( loginPW.equals( rs.getString("PW"))){
					result=1;
				}
            }

		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
            try {
                if (rs != null)
                    rs.close();
                if (pstmt != null)
                    pstmt.close();
                if (con != null)
                    con.close();
            } catch (SQLException e) {
               e.printStackTrace();

            } catch (Exception e) {
                e.printStackTrace();
            }
        }
       	
		return result;
	}