在null上调用成员函数bind_param()

I have spent hours on top of HOURS trying to fix this, but it makes no sense to me. Generally, Call to a member function bind_param() would mean something like I'm missing a variable in my statement, or I'm missing a table name. But that isn't the case, and how does on null make it different? Plus, how can you solve it with this code?

Here's my php:

if (isset($_POST['submit'])) {
              date_default_timezone_set('America/Chicago');
              $title = $_POST['title'];
              $author = $_POST['author'];
              $ptext = $_POST['ptext'];
              $imgpath = $_POST['imagepath'];
              $tags = $_POST['tags'];
              $hidden_tags = $_POST['hidden_tags'];
              $body = $_POST['body'];
              $post_date = date('Y/m/d H:i:s');
              $pad = date('M Y');


          $stmt = $con->prepare("INSERT INTO posts (title, author, prev_text, img_path, tags, hidden_tags, body, post_date, pad) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
          $stmt->bind_param("sssssssss", $title, $author, $ptext, $imgpath, $tags, $hidden_tags, $body, $post_date, $pad);
          echo 'This is a statement test as'.$stmt.'';

              $stmt->execute();
              $stmt->close();
              $con->close();

...And here's my form:

 <form method="post">
           <input type="text" placeholder="Post Title" class="input-box top-margin" name="title" required maxlength="40">
           <br>
           <input type="text" placeholder="Author Name" class="input-box top-margin" name="author" required>
           <br>
           <input type="text" placeholder="Short Preview Text" class="input-box top-margin" name="ptext" required>
           <br>
           <input type="text" class="top-margin input-box top-margin" placeholder="Insert an image path..." name="imagepath" required>
           <br>
           <input type="text" class="top-margin input-box top-margin" placeholder="Enter Tags..." name="tags" required>
           <br>
           <input type="text" class="top margin input-box top-margin" placeholder="Enter Hidden Tags..." name="hidden_tags" required>
           <br>
           <textarea class="input-box top-margin" style="height:150px;" name="body" required></textarea>
           <br>
           <input type="submit" value="Launch Post" class="long-btn btn-def top-margin bottom-margin" name="submit">
        </form>

That's not all however. I think this might be related, but I have this error as well:

PHP Warning:  mysqli::prepare(): Couldn't fetch mysqli in

Thanks for your helpful comments! They're all appreciated!