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

$html

"; - $query = $Db->prepare('INSERT INTO comments (page, message, author) VALUES (?, ?, ?)'); - $query->execute([ $Page, $html, $User->login ]); + $query = $Db->query('INSERT INTO comments (page, message, author) VALUES (?, ?, ?)', [ + $Page, $html, $User->login + ]); if (!$query->rowCount()) { throw new Exception('Fout bij opslaan'); } @@ -20,8 +21,7 @@ if ($_POST) { } } -$query = $Db->prepare('SELECT * FROM comments WHERE page = ? ORDER BY created'); -$query->execute([$Page]); +$query = $Db->query('SELECT * FROM comments WHERE page = ? ORDER BY created', [$Page]); print '