Fatal error: Call to a member function execute() on boolean in ---- on line 18
I keep getting this error. What I want to happen is for when you click the delete button on a post it will delete it. This is line 18
$result->execute(array(':id' => $_GET['delpost']));
PHP
if (isset($_GET['delpost'])) {
$result = mysqli_query( $connection,'DELETE FROM blog WHERE id = :id') ;
$result->execute(array(':id' => $_GET['delpost']));
header('Location: blog.php?action=deleted');
exit;
}