Einchecken des Online-Codes

This commit is contained in:
2017-05-07 14:37:49 +00:00
parent 9c1d71cea6
commit 85cc95c574
635 changed files with 76260 additions and 0 deletions

19
admin/inhalte/orte.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
$sqla = "SELECT Ortname FROM Orte;";
$resulta = $db->query($sqla);
while ($nta = $resulta->fetch_assoc()) {
if ($nta['Ortname'] == $_POST['Ort']) {
exit();
}
}
$sqls = 'INSERT INTO Orte (ID, Ortname) VALUES (NULL, "'.$_POST['Ort'].'");';
$stmts = $db->prepare($sqls);
if (!$stmts) {
die ('Datensatz konnte nicht angelegt werden: '.$db->error);
}
if (!$stmts->execute()) {
die ('Datensatz konnte nicht angelegt werden: '.$stmts->error);
}