commit b81ce984d0f39971353ea1d4f2f4fb1cd2dedc88 parent 9731dd2a9098cabc84d3a138f494be0f38729ce4 Author: MTRNord <mtrnord1@gmail.com> Date: Sat, 16 May 2015 14:07:49 +0200 next try Diffstat:
| M | core/backend/blog/posts.php | | | 15 | +++++++++------ |
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php @@ -170,14 +170,17 @@ function shortText($string,$lenght) { //$longtext = $post_text; function deletePost($id) { - include($root . '/core/config/connect.db.inc.php'); global $connection; - $stmt = $connection->prepare('DELETE FROM posts WHERE id=?'); - $stmt->bind_param('i',$id); - if ($stmt === FALSE) { - die($mysqli->error); + if ($connection->query(DELETE FROM posts WHERE id=$id) === TRUE) { + echo "Record deleted successfully"; + } else { + echo "Error deleting record: " . $connection->error; } - $stmt->execute(); + + $connection->close(); + + + }