25 lines
539 B
PHP
25 lines
539 B
PHP
<?php
|
|
$cockDatabase = "dulow";
|
|
$host = "localhost";
|
|
$user = "root";
|
|
$password = "";
|
|
|
|
$conn = new mysqli($host,$user,$password,$cockDatabase);
|
|
if ($conn->connect_error){
|
|
die("Verbindung fehlgeschlagen: " . $conn->connect_error);
|
|
}
|
|
|
|
var_dump($_POST['url']);
|
|
var_dump($_POST['author']);
|
|
if($_POST['url'] == '' && $_POST['author'] == ''){
|
|
header('Location: /');
|
|
return;
|
|
}
|
|
|
|
|
|
$url = $_POST['url'];
|
|
$author = $_POST['author'];
|
|
|
|
$sql = "INSERT INTO cheaterliste (url, author) VALUES('".$url."', '".$author."')";
|
|
$conn->query($sql);
|
|
?>
|