Lockfile check.php, addhit.php, BuLi-Tipp Debugging, Galerie Kommentarfunktion
This commit is contained in:
23
galerie/submit_kommentar.php
Executable file
23
galerie/submit_kommentar.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
|
||||
if(!isset($_GET["ev"])) die("GET ev fehlt");
|
||||
$ev=$_GET["ev"];
|
||||
|
||||
if(!isset($_GET["jahr"])) die("GET jahr fehlt");
|
||||
$jahr=$_GET["jahr"];
|
||||
|
||||
if(!isset($_GET["bild"])) die("GET bild fehlt");
|
||||
$bild=$_GET["bild"];
|
||||
|
||||
if(!isset($_GET["username"])) die("GET username fehlt");
|
||||
$username=$_GET["username"];
|
||||
|
||||
if(!isset($_GET["kommentar"])) die("GET kommentar fehlt");
|
||||
$kommentar=$_GET["kommentar"];
|
||||
if(strlen($kommentar)>1024) die("Kommentar zu lang");
|
||||
|
||||
include("../../mysqlverbinden.php");
|
||||
|
||||
mysqli_execute_query($db_id, "INSERT INTO `galerie-kommentare` (`ev`,`jahr`,`bild`,`username`,`kommentar`) VALUES (?,?,?,?,?)",[$ev,$jahr,$bild,$username,$kommentar]);
|
||||
?>
|
||||
Reference in New Issue
Block a user