X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/75cbd3cb3b7e08963686ca81976c086fd531a8b8..ce6d14a5ee9d14d5573798e635e1ffe47cf65602:/widget/nieuws/replies.php diff --git a/widget/nieuws/replies.php b/widget/nieuws/replies.php index 13533c9..cfa9487 100644 --- a/widget/nieuws/replies.php +++ b/widget/nieuws/replies.php @@ -8,8 +8,10 @@ if ($_POST) { try { $html = nl2br(htmlspecialchars($_POST['reply'])); $html = "

$html

"; - $query = $Db->query('INSERT INTO comments (page, message, author) VALUES (?, ?, ?)', [ - $Page, $html, $User->login + $query = $Db->insert('comments', [ + 'page' => $Page, + 'message' => $html, + 'author' => $User->login, ]); if (!$query->rowCount()) { throw new Exception('Fout bij opslaan');