You can now update gameData information
This commit is contained in:
@@ -17,7 +17,6 @@ if(isset($_SESSION['token'])){
|
||||
if(!isset($group->game_data_id)){
|
||||
if(isset($_POST['submitUpload'])){
|
||||
//Get the data from the user form
|
||||
echo "tesz";
|
||||
$gameFile = $_FILES['gameFile'];
|
||||
$desc = $_POST['description'];
|
||||
$title = $_POST['gameTitle'];
|
||||
@@ -32,12 +31,12 @@ if(isset($_SESSION['token'])){
|
||||
$thumbnailFileTmp = $_FILES['thumbnailFile']['tmp_name'];//Tmp location of the file
|
||||
$thumbnailFileError =$_FILES['thumbnailFile']['error'];//File error
|
||||
|
||||
if($thumbnailFileError === 0 && $gameFileError === 0){
|
||||
if($gameFileError === 0){
|
||||
$gameData = new GameData();
|
||||
$gameData->game_name = $title;
|
||||
$gameData->game_link = ZipFileHandler($gameFileName,$gameFileTmp);
|
||||
$gameData->description = $desc;
|
||||
if(isset($thumbnail)){
|
||||
if(isset($thumbnail) && $thumbnailFileError === 0){
|
||||
$gameData->img = imagesFileHandler($thumbnailFileName,$thumbnailFileTmp);
|
||||
}
|
||||
$gameData->is_web_Based = $isWebBased;
|
||||
|
||||
Reference in New Issue
Block a user