public static function removeinvite($username, $password, $guildname, $username2) { if (User::isValidUser($username, $password)) { if (User::isGuildMaster($username, $guildname)) { $rows = Queries::getRowsWithValue(Database::$table_invites, "guildname", $guildname); for ($i = 0; $i < sizeof($rows); $i++) { if ($rows[$i]['username'] == $username2) { if (Queries::deleteWithTwoVals(Database::$table_invites, "username", $username2, "guildname", $guildname)) { return "success"; } return "failed to access database"; } } return "request not found"; } return "only guildmaster can do this"; } return "invalid user"; }