7 Commits

Author SHA1 Message Date
Ubuntu
896f42f4b0 submip.php file almost done 2019-04-22 19:11:58 -04:00
Ubuntu
9b4d874b62 fixed upload.php merge conflict 2019-04-20 16:51:49 -04:00
Ubuntu
dfaf9a1fe9 Merge branch 'master' into Tristan_submit.php 2019-04-20 16:45:14 -04:00
Ubuntu
bdefb1a3b4 Merge branch 'master' into Tristan_submit.php 2019-04-20 16:33:00 -04:00
Ubuntu
2168199135 upload.php 1st draft 2019-04-20 16:27:51 -04:00
Ubuntu
a4832358ea Merge branch 'master' into Tristan_submit.php 2019-04-20 16:22:22 -04:00
root
9147fc6f47 wassup 2019-04-17 00:37:11 -04:00
2 changed files with 67 additions and 0 deletions

66
submit.php Normal file
View File

@@ -0,0 +1,66 @@
<?php
$servername = "localhost";
$username = "fighthubuser";
$password = "cC33dC8W";
$database = "fighthubdata";
$conn = new mysqli($servername, $username, $password, $database);
if($conn->connect_error) {
//echo "it dead<br>i";
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<br>";
$url = mysqli_real_escape_string($conn, $url);
//echo "done<br>";
$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<br>";
//echo "<script type='text/javascript'>alert('".$stage."');</script>";
$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 "<script type='text/javascript'>alert($sql);</script>";
//echo $sql;
if($conn->query($sql) === TRUE){
echo "New record created successfully";
}
else {
echo "Error";
echo $conn->error;
}
$conn->close()
//echo "<script type='text/javascript'>window.location.href = 'index.php';</script>"
//header("Location: http://ec2-18-217-5-198.us-east-2.compute.amazonaws.com/index.php");
//exit;
?>
<script>
location.replace("http://ec2-18-217-5-198.us-east-2.compute.amazonaws.com/index.php");
</script>

1
text.txt Normal file
View File

@@ -0,0 +1 @@
yo