You can now update gameData information
This commit is contained in:
parent
5bd15d9442
commit
29e9bf10f3
|
@ -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;
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
<input type="submit" name="submitUpload" value="Submit">
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<form action="updateGameJam.php" method="POST">
|
||||
<input type="submit" value="Gå til Opdater" name="updateGamJam" id="pog" />
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue