Public Version 1 on spinn-mit.ch

This commit is contained in:
nooahe committed 2023-01-03 16:08:52 +01:00
1 parent 522e01979f
commit 13ebde7ef1
11 files changed
+460 -145

No files matched your search

+7 -8
View File
@@ -1,10 +1,7 @@
<?php
require_once('data.php');
?>
<?php
$db = dbVerbindungErzeugen();
$lat = $_POST['lat'];
@@ -17,21 +14,23 @@ require_once('data.php');
$inhalt = $_POST['text'];
}
if(isset($_POST['adresse'])){
$adresse = $_POST['adresse'];
}
if(isset($_POST['bilder'])){
$bilder = $_POST['bilder'];
} else {
$bilder = NULL;
}
$sql = "INSERT INTO idee (titel, inhalt, koordinatenLat, koordinatenLng, bild) VALUES (?, ?, ?, ?, ?)";
$sql = "INSERT INTO idee (titel, inhalt, koordinatenLat, koordinatenLng, bild, adresse) VALUES (?, ?, ?, ?, ?, ?)";
$stmt = $db->prepare($sql);
$stmt->execute(array($titel, $inhalt, $lat, $lng, $bilder));
$stmt->execute(array($titel, $inhalt, $lat, $lng, $bilder, $adresse));
echo $db->lastInsertId();
header("Location: /");
die();
?>
?>