title: MySQL database not updating when form is submited
body: <p><em>EDITED</em> I am using HTML forms and PHP to upload data to a MySQL database. When I submit the information an image that i uploaded gets moved to a specific folder(the way i intended it to), but the data does not get uploaded to the data base. 
  I added most of the code now, the site didn't allow me to add everything, I deleted some lines that in my opinion don't have anything to do with the problem at hand. so maybe you'll see the problem:</p>
  
  <pre><code>&lt;!DOCTYPE&gt;
  &lt;?php 
  
  include("includes/db.php");
  
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Inserting Product&lt;/title&gt; 
  
  &lt;script src="//tinymce.cachefly.net/4.1/tinymce.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      tinymce.init({selector:'textarea'});
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body bgcolor="grey"&gt;
  
  
  &lt;form action="insert_product.php" method="post" enctype="multipart/form-
  data"&gt; 
  
      &lt;table align="center" width="795" border="2" bgcolor="lime"&gt;
  
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td align="right"&gt;&lt;b&gt;Product Category:&lt;/b&gt;&lt;/td&gt;
              &lt;td&gt;
              &lt;select name="product_cat" &gt;
                  &lt;option&gt;Select a Category&lt;/option&gt;
                  &lt;?php 
      $get_cats = "select * from categories";
  
      $run_cats = mysqli_query($con, $get_cats);
  
      while ($row_cats=mysqli_fetch_array($run_cats)){
  
      $cat_id = $row_cats['cat_id']; 
      $cat_title = $row_cats['cat_title'];
  
      echo "&lt;option value='$cat_id'&gt;$cat_title&lt;/option&gt;";
  }
                  ?&gt;
              &lt;/select&gt;
  &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td align="right"&gt;&lt;b&gt;Product Publisher:&lt;/b&gt;&lt;/td&gt;
          &lt;td&gt;            &lt;select name="product_dev"&gt;
              &lt;option&gt;Select a Publisher&lt;/option&gt;
              &lt;?php
              $get_devs = "select * from developers";
  
              $run_devs = mysqli_query($con, $get_devs);
  
              while ($row_devs=mysqli_fetch_array($run_devs)){
  
              $dev_id = $row_devs['dev_id']; 
              $dev_title = $row_devs['dev_title'];
  
              echo "&lt;option value='$dev_id'&gt;$dev_title&lt;/option&gt;";
  }
              ?&gt;
          &lt;/select&gt;
  
  
              &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td align="right"&gt;&lt;b&gt;Product Image:&lt;/b&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="file" name="product_image" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td align="right"&gt;&lt;b&gt;Product Price:&lt;/b&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" name="product_price" required/&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td align="right"&gt;&lt;b&gt;Product Keywords:&lt;/b&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" name="product_keywords" size="50" 
  required/&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr align="center"&gt;
              &lt;td colspan="7"&gt;&lt;input type="submit" name="insert_post" 
  value="Insert Product Now"/&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form&gt;
  &lt;/body&gt; 
  &lt;/html&gt;
  &lt;?php 
  
  if(isset($_POST['insert_post'])){
  
      $product_title = $_POST['product_title'];
      $product_cat= $_POST['product_cat'];
      $product_pub = $_POST['product_pub'];
      $product_dev = $_POST['product_dev'];
      $product_price = $_POST['product_price'];
      $product_desc = $_POST['product_desc'];
      $product_keywords = $_POST['product_keywords'];
  
      $product_image = $_FILES['product_image']['name'];
      $product_image_tmp = $_FILES['product_image']['tmp_name'];
  
      move_uploaded_file($product_image_tmp,"product_images/$product_image");
  
       $insert_product = "insert into products 
  (product_cat,product_pub,product_dev,
  product_title,product_price,product_desc,product_image,
  product_keywords) values ('$product_cat','$product_pub','$product_dev',
  '$product_title','$product_price','$product_desc',
  '$product_image','$product_keywords')";
  
       $insert_pro = mysqli_query($con, $insert_product);
  
       if($insert_pro){
  
       echo "&lt;script&gt;alert('Product Has been inserted!')&lt;/script&gt;";
       echo "&lt;script&gt;window.open('index.php?insert_product','_self')
  &lt;/script&gt;";
  
       }
  }
  
  
  ?&gt;
  </code></pre>