ganz viel geiler scheiss gemacht!

This commit is contained in:
Marlon Portmann committed 2022-11-14 16:27:53 +01:00
1 parent a3a6cbe329
commit f365ca3592
10 files changed
+249 -35

No files matched your search

+10 -4
View File
@@ -7,17 +7,23 @@ require_once('data.php');
$db = dbVerbindungErzeugen();
$lat = $_POST['lat'];
$lng = $_POST['lng'];
if(isset($_POST['titel'])){
$titel = $_POST['titel'];
}
if(isset($_POST['inhalt'])){
$inhalt = $_POST['inhalt'];
if(isset($_POST['text'])){
$inhalt = $_POST['text'];
}
$sql = "INSERT INTO idee (titel, inhalt) VALUES (?, ?)";
$sql = "INSERT INTO idee (titel, inhalt, koordinatenLat, koordinatenLng) VALUES (?, ?, ?, ?)";
$stmt = $db->prepare($sql);
$stmt->execute(array($titel, $inhalt));
$stmt->execute(array($titel, $inhalt, $lat, $lng));
echo $db->lastInsertId();
header("Location: https://751068-4.web.fhgr.ch/");
die();
?>