25 lines
		
	
	
	
		
			560 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			560 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
session_start();
 | 
						|
$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']);
 | 
						|
if($_POST['url'] == ''){
 | 
						|
  header('Location: /');
 | 
						|
  return;
 | 
						|
}
 | 
						|
 | 
						|
$url = $_POST['url'];
 | 
						|
$author = $_SESSION['user'];
 | 
						|
 | 
						|
  $sql = "INSERT INTO cheaterliste (url, author) VALUES('".$url."', '".$author."')";
 | 
						|
  $conn->query($sql);
 | 
						|
?>
 | 
						|
<meta http-equiv="refresh" content="0; url=/index.php" />
 |