From 9147fc6f47d84161426737b650f555d61c1246d5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Apr 2019 00:37:11 -0400 Subject: [PATCH 1/4] wassup --- text.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 text.txt diff --git a/text.txt b/text.txt new file mode 100644 index 0000000..092bfb9 --- /dev/null +++ b/text.txt @@ -0,0 +1 @@ +yo From 216819913572dd319e13fad71d8a09f30d2aedd2 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 20 Apr 2019 16:27:51 -0400 Subject: [PATCH 2/4] upload.php 1st draft --- upload.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 upload.php diff --git a/upload.php b/upload.php new file mode 100644 index 0000000..1a665e4 --- /dev/null +++ b/upload.php @@ -0,0 +1,34 @@ + + + FightHub - Upload + + + + + + connect_error) { + die("Connection failed: " . $conn->connect_error); + } + + $url = $_GET['url']; + $name = $_GET['name']; + $username = $_GET['username']; + $description = $_GET['description']; + $event_date = $_GET['date']; + $length = $_GET['length']; + $characters = $_GET['characters']; + $players = $_GET['players']; + $game = $_GET['game']; + $stage = $_GET['stage']; + + echo "

" . $game . "

"; + ?> + + From 9b4d874b62172f9c951d1e60cf02c1d326647f98 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 20 Apr 2019 16:51:49 -0400 Subject: [PATCH 3/4] fixed upload.php merge conflict --- upload.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/upload.php b/upload.php index cc76020..7bf6d0d 100644 --- a/upload.php +++ b/upload.php @@ -1,39 +1,3 @@ -<<<<<<< HEAD - - - FightHub - Upload - - - - - - connect_error) { - die("Connection failed: " . $conn->connect_error); - } - - $url = $_GET['url']; - $name = $_GET['name']; - $username = $_GET['username']; - $description = $_GET['description']; - $event_date = $_GET['date']; - $length = $_GET['length']; - $characters = $_GET['characters']; - $players = $_GET['players']; - $game = $_GET['game']; - $stage = $_GET['stage']; - - echo "

" . $game . "

"; - ?> - - -======= FightHub - Upload @@ -97,4 +61,3 @@ ->>>>>>> master From 896f42f4b06f8bb7484161f40bd72dca8c5ccfa0 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 22 Apr 2019 19:11:58 -0400 Subject: [PATCH 4/4] submip.php file almost done --- submit.php | 92 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 30 deletions(-) diff --git a/submit.php b/submit.php index ad299c3..a9ac09d 100644 --- a/submit.php +++ b/submit.php @@ -1,34 +1,66 @@ - - - FightHub - Upload - - - + - connect_error) { + //echo "it dead
i"; + die("Connection failed: " . $conn->connect_error); +} - if($conn->connect_error) { - die("Connection failed: " . $conn->connect_error); - } +$url = $_GET['url']; +$title = $_GET['name']; +$username = $_GET['username']; +$description = $_GET['description']; +$event_date = $_GET['video-date']; +$length = $_GET['length']; +$characters = $_GET['characters']; +$players = $_GET['players']; +$game = $_GET['game']; +$stage = $_GET['stage']; +$date = date('Y\-m\-d'); +//echo "here
"; + +$url = mysqli_real_escape_string($conn, $url); +//echo "done
"; +$title = mysqli_real_escape_string($conn, $title); +$username = mysqli_real_escape_string($conn, $username); +$description = mysqli_real_escape_string($conn, $description); +$event_date = mysqli_real_escape_string($conn, $event_date); +$length = mysqli_real_escape_string($conn, $length); +$characters = mysqli_real_escape_string($conn, $characters); +$players = mysqli_real_escape_string($conn, $players); +$game = mysqli_real_escape_string($conn, $game); +$stage = mysqli_real_escape_string($conn, $stage); +$date = mysqli_real_escape_string($conn, $date); +//echo "there boi
"; +//echo ""; + +$sql = "INSERT INTO video (video_url, video_name, username, date_upload, date_video, video_length, description, characters, players, game, stage, approved) VALUES ('$url', '$title', '$username', '$date', '$event_date', '$length', '$description', '$characters', '$players', '$game', '$stage', TRUE)"; + +//echo ""; +//echo $sql; + +if($conn->query($sql) === TRUE){ + echo "New record created successfully"; +} +else { + echo "Error"; + echo $conn->error; +} +$conn->close() + +//echo "" + +//header("Location: http://ec2-18-217-5-198.us-east-2.compute.amazonaws.com/index.php"); + +//exit; +?> + + - $url = $_GET['url']; - $name = $_GET['name']; - $username = $_GET['username']; - $description = $_GET['description']; - $event_date = $_GET['date']; - $length = $_GET['length']; - $characters = $_GET['characters']; - $players = $_GET['players']; - $game = $_GET['game']; - $stage = $_GET['stage']; - echo"

hello

"; - echo $game; - ?> - -