title: Call to a member function execute() on boolean in
body: <p>My html :</p>
  
  <pre><code> &lt;form action="rent.php" method="post"&gt;&lt;pre&gt;
          Email : &lt;input  type="text" name="email"&gt;
          Message : &lt;input type="text" name="msg_text"&gt;
                  &lt;input type="submit" value="Rent it"&gt;
      &lt;/pre&gt;&lt;/form&gt;
  </code></pre>
  
  <p>My rent.php file :</p>
  
  <pre><code>&lt;?php
   require_once 'login.php';
     $conn = new mysqli($hn, $un, $pw, $db);
     if ($conn-&gt;connect_error) {
      die($conn-&gt;connect_error);
  }
      $query = "SET NAMES utf8";
      $result = $conn-&gt;query($query);
      if (!$result) {
          die($conn-&gt;error);
      }
  
      $req = $conn-&gt;prepare('INSET INTO renter (email, msg_text) VALUES(?, ?)');
      $req-&gt;execute(array($_POST['email'], $_POST['msg_text']));
  
      header('Location: menu.php');
  </code></pre>
  
  <p>My error when I try to submit, is : Fatal error: Call to a member function execute() on boolean in C:...\rent.php on line 18</p>
  
  <p>email, msg_text are in varchar type</p>