public int userCheck(String id, String passwd) 
    		throws Exception {
    			Connection conn = null;
    	        PreparedStatement pstmt = null;
    			ResultSet rs= null;
    	        String dbpasswd="";
    			int x=-1;
    	        
    			try {
    	            conn = getConnection();
    	            
    	            pstmt = conn.prepareStatement(
    	            	"select passwd from MEMBER where id = ?");
    	            pstmt.setString(1, id);
    	            rs= pstmt.executeQuery();

    				if(rs.next()){
    					dbpasswd= rs.getString("passwd"); 
    					if(dbpasswd.equals(passwd))
    						x= 1; //인증 성공
    					else
    						x= 0; //비밀번호 틀림
    				}else
    					x= -1;//해당 아이디 없음
    				
    	        } catch(Exception ex) {
    	            ex.printStackTrace();
    	        } finally {
    				if (rs != null) try { rs.close(); } catch(SQLException ex) {}
    	            if (pstmt != null) try { pstmt.close(); } catch(SQLException ex) {}
    	            if (conn != null) try { conn.close(); } catch(SQLException ex) {}
    	        }
    			return x;
    		}