diff --git a/hello b/hello deleted file mode 100755 index e69de29..0000000 diff --git a/index.php b/index.php index c02ebc3..3b3a8bc 100755 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ - + FightHub - Home @@ -6,7 +6,7 @@ + + + @@ -153,5 +152,5 @@ function writeEntryforIndex() { ?> - + diff --git a/submit.php b/submit.php new file mode 100644 index 0000000..1d4954d --- /dev/null +++ b/submit.php @@ -0,0 +1,66 @@ +connect_error) { + //echo "it dead
i"; + die("Connection failed: " . $conn->connect_error); +} + +$url = $_GET['url']; +$title = $_GET['title']; +$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; +?> + + + diff --git a/test.txt b/test.txt deleted file mode 100755 index 90bfcb5..0000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -this is a test diff --git a/upload.php b/upload.php index 7bf6d0d..3d1adee 100755 --- a/upload.php +++ b/upload.php @@ -1,63 +1,84 @@ - - - FightHub - Upload - - - - - - - - - -
- -

Youtube URL *

- - -

Name *

- - -

Username *

- - -

Description

- - -

Event Date

- - -

Video Length

- - -

Characters (Seperated by commas) *

- - -

Players (Seperated by commas) *

- - -

Select Game *

- - -

Stage Name *

- - - - -
- - - + + + FightHub - Upload + + + + + + + + + +
+ +

Youtube URL *

+ + +

Video Title *

+ + +
+
+

Username *

+ +
+ + +
+

Event Date *

+ +
+
+ +

Description

+ + +

Characters (Seperated by commas) *

+ + +

Players (Seperated by commas) *

+ + + + + +
+
+

Select Game *

+ +
+ +
+

Stage Name *

+ +
+
+ +
+
+

Video Length

+ +
+ +
+ +
+
+
+ + +