title: Call to a member function bind_param() on a non-object MySQLi
body: <p>Okay, so I'm trying to update a blog entry, and I'm getting Call to a member function bind_param() on a non-object when I try to run the script. I have done extensive research to see if I could fix it myself, but I must be missing something.</p>
  
  <pre><code>&lt;?php
  $stmt = $mysqli-&gt;prepare("UPDATE blogentries SET 
    headline = ?, 
     image = ?, 
     caption = ?,  
     article = ?
      WHERE id = ?");
  $stmt-&gt;bind_param('ssssi',
     $_POST['headline'],
     $_POST['image'],
     $_POST['caption'],
     $_POST['article'],
     $_POST['id']);
  $stmt-&gt;execute(); 
  $stmt-&gt;close();
  
  ?&gt;
  </code></pre>
  
  <p>Thanks in advance,</p>
  
  <p>Austen</p>
  
  <p>Update: Here's the db connect</p>
  
  <p>I added the extra $mysqli connection for debugging purposes, and the error occurs even without it.</p>