title: why is mysqli insert not working?
body: <p>I'm trying to insert data into my MySQL table, but with no luck. My code looks like:</p>
  
  <pre><code>$mysqli = mysqli_connect("localhost","login info");
  
  if ($mysqli-&gt;connect_errno) {
      echo "Failed to connect to MySQL: (" . $mysqli-&gt;connect_errno . ") " . $mysqli-&gt;connect_error;
  }
  
  if (isset($_POST['submit'])) {
      $number = $_POST['number'];
      $road = $_POST['road'];
      $postcode=$_POST['postcode'];
      $price=$_POST['price'];
      $type=$_POST['type'];
      $bedrooms=$_POST['bedrooms'];
      $agent=$_POST['agent'];
      $featured=$_POST['featured'];
      $keywords=$_POST['keywords'];
  
      $mysqli-&gt;query("
          INSERT INTO listings-rent
              (number, road, postcode, price, type, bedrooms, agent, featured, keywords)
          VALUES
              ('$number','$road','$postcode','$price','$type','$bedrooms','$agent','$featured','$keywords')");
  }
  </code></pre>
  
  <p>The connection is fine, returns no errors.</p>