bilder hochladen und anzeigen funktioniert!

This commit is contained in:
nooahe committed 2022-11-15 16:03:28 +01:00
1 parent 93bab0b3c5
commit 98485ebb78
3 files changed
+67 -42

No files matched your search

+8 -2
View File
@@ -17,9 +17,15 @@ require_once('data.php');
$inhalt = $_POST['text'];
}
$sql = "INSERT INTO idee (titel, inhalt, koordinatenLat, koordinatenLng) VALUES (?, ?, ?, ?)";
if(isset($_POST['bilder'])){
$bilder = $_POST['bilder'];
}
$sql = "INSERT INTO idee (titel, inhalt, koordinatenLat, koordinatenLng, bild) VALUES (?, ?, ?, ?, ?)";
$stmt = $db->prepare($sql);
$stmt->execute(array($titel, $inhalt, $lat, $lng));
$stmt->execute(array($titel, $inhalt, $lat, $lng, $bilder));
echo $db->lastInsertId();