I have programmed a ticket system in PHP. All entries from the database are displayed, only the script tedit.inc.php, which is included in the index.php via include() command, does not enter the data into the database. All connection data are correct. Once the code:
<?php
if (!empty($form) && $form == "f3875T-x") {
echo <<<FORMULAR
Ticket erstellen
Titel:
<input type="text" name="Headline" size="50">
Beschreibung:
FORMULAR;
}
if (!empty($Headline) && !empty($Eintrag)) {
$Name = mysqli_real_escape_string($db, $Name);
$Headline = mysqli_real_escape_string($db, $Headline);
$Eintrag = mysqli_real_escape_string($db, $Eintrag);
$datum = date("d.m.Y, H:i") . " Uhr";
$sql = "INSERT INTO ts_sys " .
"VALUES ('', '$Name', '$Headline', '$datum', '$Eintrag')";
mysqli_query($db, $sql);
}
?>
I hope someone can help me. Also deleting the entries via PHP script works.