add token on upload
This commit is contained in:
parent
c7f17a7c17
commit
cfc5b55074
|
@ -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;
|
||||
|
@ -68,4 +71,6 @@ if(isset($_POST['submitUpload'])){
|
|||
echo "Wrong file type";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue