Game-Jaming/Backend/Controllers/Group/UpdateGruop.php

21 lines
438 B
PHP

<?php
require "../../../bootstrap.php";
require_once "Group.php";
use Backend\Models\Group;
if(isLogin()){
if (isset($_POST['updateGroup'])) {
if($group = groupViaToken($_SESSION['token'])){
$group->group_name = $_POST['groupName'];
$group->group_amount = $_POST['groupAmount'];
$group->game_jam_id = $_POST['gameJamId'];
$group->save();
}
}
}