//to continue edit
     $group->name = $_POST['groupName'];
     $group->prev_name = $_POST['prevName'];
     $group->id = $_POST['groupID'];
     $group->homepage = $_POST['groupPage'];
     $group->description = $_POST['groupDesc'];
     if (!$groups->isValidName($_POST['groupName']) && $_POST['groupName'] != $_POST['prevName']) {
         if ($_POST['groupName'] == "") {
             $errorMessage = "Please specify a name for the group.";
             $mode = "edit";
         } else {
             $errorMessage = "A group with the name <b>" . $_POST['groupName'] . "</b> already exists.";
             $mode = "edit";
         }
     } else {
         if ($groups->updateGroup($_POST['groupID'], $_POST['groupName'], $_POST['groupPage'], $_POST['groupDesc'])) {
             $groups->write("Group <b>" . $_POST['groupName'] . "</b> updated successfuly.");
             $group = "";
         } else {
             $errorMessage = "Group <b>" . $_POST['prevName'] . "</b> was not updated successfuly.";
             $mode = "edit";
         }
     }
     break;
 case "delete":
     $idDel = $_REQUEST['id'];
     if ($idDel != "") {
         if ($groups->deleteGroup($idDel)) {
             $groups->write("Group Deleted.");
         } else {
             $groups->write("Invalid group. No groups were deleted.", false);