23 lines
318 B
PHP
23 lines
318 B
PHP
<?php
|
|
require_once('data.php');
|
|
?>
|
|
|
|
|
|
<?php
|
|
|
|
$db = dbVerbindungErzeugen();
|
|
|
|
if(isset($_POST['text'])){
|
|
$inhalt = $_POST['text'];
|
|
}
|
|
|
|
$id = $_POST['idee_id'];
|
|
echo($id);
|
|
|
|
$sql = "INSERT INTO kommentar (k_text, idee_id) VALUES (?, ?)";
|
|
$stmt = $db->prepare($sql);
|
|
$stmt->execute(array($inhalt, $id));
|
|
|
|
|
|
?>
|