add token on upload

This commit is contained in:
neerholt 2021-03-09 13:30:21 +01:00
parent c7f17a7c17
commit cfc5b55074
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,10 @@ use Backend\Models\GameData;
$isImages = false;
session_start();
if(isset($_SESSION['token'])){
if(isset($_POST['submitUpload'])){
//Get the data from the user form
$gameFile = $_FILES['gameFile'];
@ -46,7 +50,6 @@ if(isset($_POST['submitUpload'])){
header("location: ../../../Frontend/index.php?error=emptyFile");
exit();
}else{
$gameData = new GameData();
$gameData->game_name = $title;
$gameData->game_link = $gameFileNewName;
@ -69,3 +72,5 @@ if(isset($_POST['submitUpload'])){
}
}
}