add token on upload
This commit is contained in:
parent
c7f17a7c17
commit
cfc5b55074
|
@ -4,6 +4,10 @@ use Backend\Models\GameData;
|
||||||
|
|
||||||
$isImages = false;
|
$isImages = false;
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if(isset($_SESSION['token'])){
|
||||||
|
|
||||||
if(isset($_POST['submitUpload'])){
|
if(isset($_POST['submitUpload'])){
|
||||||
//Get the data from the user form
|
//Get the data from the user form
|
||||||
$gameFile = $_FILES['gameFile'];
|
$gameFile = $_FILES['gameFile'];
|
||||||
|
@ -46,7 +50,6 @@ if(isset($_POST['submitUpload'])){
|
||||||
header("location: ../../../Frontend/index.php?error=emptyFile");
|
header("location: ../../../Frontend/index.php?error=emptyFile");
|
||||||
exit();
|
exit();
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$gameData = new GameData();
|
$gameData = new GameData();
|
||||||
$gameData->game_name = $title;
|
$gameData->game_name = $title;
|
||||||
$gameData->game_link = $gameFileNewName;
|
$gameData->game_link = $gameFileNewName;
|
||||||
|
@ -69,3 +72,5 @@ if(isset($_POST['submitUpload'])){
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue