4
1
Fork 0
This repository has been archived on 2019-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
Cheaterliste/insert.php
2017-04-28 21:23:29 +00:00

25 lines
554 B
PHP

<?php
session_start();
$vac = "vac";
$host = "localhost";
$user = "vac";
$password = "hPUf8e4karnz61bS";
$conn = new mysqli($host,$user,$password,$vac);
if ($conn->connect_error){
die("Verbindung fehlgeschlagen: " . $conn->connect_error);
}
var_dump($_POST['url']);
if($_POST['url'] == ''){
header('Location: /');
return;
}
$url = $_POST['url'];
$author = $_SESSION['user'];
$sql = "INSERT INTO cheaterlist (url, author) VALUES('".$url."', '".$author."')";
$conn->query($sql);
?>
<meta http-equiv="refresh" content="0; url=/index.php" />