public void insert(String table, String name[], String value[]) {
		if(name.length != value.length){
			String message = "not the same length";
			throw new RangeException((short) 0, message);
		}
		try {
			con = DriverManager.getConnection(url, user, password);
			String questionMarkStm = "";

			String stm = null;
			String tableName = "";
			
			
			//dynamically concat the tables for the insert statement 
			for (String tN : name) {
				tableName += "," + tN;
			}
			tableName = tableName.replaceFirst(",","");
			
			//dynamically create the right amount of question marks for the value
			for(int i = 0; i<value.length;i++){
				questionMarkStm += ", " + "?";
			}
			questionMarkStm = questionMarkStm.replaceFirst(", ","");
			
			//create statement
			stm = "INSERT INTO " + table + "(" + tableName
					+ ") VALUES("+ questionMarkStm +")";
			pst = con.prepareStatement(stm);
			
			//set values
			for(int i = 0; i<value.length; i++){
				pst.setString(i+1, value[i]);
			}
			
			//execute statement me
			pst.executeUpdate();
		} catch (SQLException ex) {
			Logger lgr = Logger.getLogger(InsertMethod.class.getName());
			lgr.log(Level.SEVERE, ex.getMessage(), ex);

		} finally {

			try {
				if (pst != null) {
					pst.close();
				}
				if (con != null) {
					con.close();
				}

			} catch (SQLException ex) {
				Logger lgr = Logger.getLogger(InsertMethod.class.getName());
				lgr.log(Level.SEVERE, ex.getMessage(), ex);
			}
		}

	}