require_once '/var/www/connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'loadNodeData': $data->loadNodeData(); break; case 'updateGroup': $data->updateGroup(); break; case 'create_new_group': $data->create_new_group(); break; case 'remove_group': $data->remove_group(); break; case 'remove_from_groups': $data->remove_from_groups(); break; case 'add_n_to_g': $data->add_n_to_g(); break; } } //startPHP //////////////////checkLoadNames class dataClass { public function add_n_to_g() {