0

I'm getting this error when trying to import data into my editor to edit my blog post.

Uncaught Error: Call to a member function bind_param() on boolean

this is my PHP code

$stmt = $db->prepare('SELECT post_id, title, summary, body 
                    FROM posts WHERE postID = :postID');
$stmt->execute(array(':postID' => $_GET['id']));
$row = $stmt->fetch(); 

This is my HTML code

<form action="" method="POST">
    <input type='hidden' name='postID' value='<?php echo $row['post_id'];?>'>
    <label for="title">Article title</label>
    <input type="text" name="title" value="<?php echo $row['title'];?>"size="130"><br>
    <label for="summary">Article summary</label>
    <textarea name="summary" cols=130 rows=4 <?php echo $row['postDesc']?>></textarea><br>
    <label for="body">Article content</label>
    <textarea name="body" cols=130 rows=25 <?php echo $row['postDesc']?>></textarea><br>
    <input type="submit" name="submit" value="update">
    <a href="index.php" class="cancel">Cancel</a>
</form>
RiggsFolly
  • 89,708
  • 20
  • 100
  • 143

0 Answers0