try {
$html = nl2br(htmlspecialchars($_POST['reply']));
$html = "<p>$html</p>";
- $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');