mirror of
https://github.com/ClaytonWWilson/FightHub.git
synced 2025-12-15 15:18:46 +00:00
submip.php file almost done
This commit is contained in:
parent
9b4d874b62
commit
896f42f4b0
92
submit.php
92
submit.php
@ -1,34 +1,66 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>FightHub - Upload</title>
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<script src="scripts/main.js"></script>
|
||||
</head>
|
||||
<?php
|
||||
$servername = "localhost";
|
||||
$username = "fighthubuser";
|
||||
$password = "cC33dC8W";
|
||||
$database = "fighthubdata";
|
||||
|
||||
<body>
|
||||
<?php
|
||||
$servername = "localhost";
|
||||
$username = "fighthubuser";
|
||||
$password = "cC33dC8W";
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
|
||||
$conn = new mysqli($servername, $username, $password);
|
||||
if($conn->connect_error) {
|
||||
//echo "it dead<br>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<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>
|
||||
|
||||
$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"<h2>hello</h2>";
|
||||
echo $game;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user