public void update(int incre, String stu_ID, String sec_ID) throws Exception {
        String sql;
        PreparedStatement st;
        ResultSet rs;

        Connection db = ConnectionUtils.getConnection();
        
        //String student_ID = UserLogin.id;
        
        // get the student information
        sql = "update enrollment " +
            "set attendance=? " + 
            "where student_ID=? AND section_ID =?;";
        
        
        st = db.prepareStatement(sql);
        st.setInt(1, incre);
        st.setString(2, stu_ID);
        st.setString(3, sec_ID);
        rs = st.executeQuery();
        if (!rs.next()) {
            throw new IllegalArgumentException("invalid course id");
        }
        
        rs.close();
        st.close();
        db.close();
    }