title: Data not getting into MySql Database
body: <p>I've read some related question regarding my problem but I still can't figure it out. So I decided to ask now. </p>
  
  <p>I'd like to know if there is something wrong with my code. Basically, the data in the input boxes should get into the database( MYSQL ) but everytime I click the submit button, nothing is happening.</p>
  
  <p>Code: 
   <strong>insert_product.php</strong> &lt;-- main page</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;?php
  include("includes/db.php");
  ?&gt;
  &lt;html&gt;
      &lt;head&gt;
  
      &lt;/head&gt;
  &lt;script src="//cdn.tinymce.com/4/tinymce.min.js"&gt;&lt;/script&gt;
   &lt;script&gt;tinymce.init({ selector:'textarea' });&lt;/script&gt;
  
  &lt;body bgcolor="#aad6bb"&gt;
      &lt;form action="insert_product.php" method="post" enctype="multipart/form-data"&gt;
          &lt;table align="center" width="600" border='1' bgcolor='#d6aac5'&gt;
  
              &lt;tr align="center"&gt;
                  &lt;td colspan='8'&gt;&lt;h2&gt;Inser New Post Here&lt;/h2&gt;&lt;/td&gt;   
              &lt;/tr&gt;
  
              &lt;tr &gt;
                  &lt;td align="right"&gt; &lt;b&gt;Product Name:&lt;b&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type='text'name="product_name" size='50'/&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td align="right"&gt;&lt;b&gt; Product Description&lt;/b&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;textarea name="product_desc" cols='20' rows='10'&gt;&lt;/textarea&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"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td align="right"&gt;&lt;b&gt; Product Quantity:&lt;/b&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type='text'name="product_quantity"/&gt;&lt;/td&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 Category&lt;/option&gt;
                          &lt;?php
                              $get_cats = "Select * from categories";
                              $run_cat = mysqli_query($con, $get_cats);
                              while ($row_cats=mysqli_fetch_array($run_cat)){
                              $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 Image:&lt;/b&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type='file' name="product_img"/&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' size="40" name="product_kw"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr  align='center'&gt;
                  &lt;td colspan='8'&gt;&lt;input type='submit'name="insert_post" value="Insert Product"/&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'])){
  //GETTING DATA FROM THE FIELD
          $product_name= $_POST['product_name'];
          $product_desc= $_POST['product_desc'];
          $product_price= $_POST['product_price'];
          $product_quantity= $_POST['product_quantity'];
          $product_cat= $_POST['product_cat'];
          $product_kw= $_POST['product_kw'];
  //GETTING IMAGE FROM THE FIELD
          $product_img = $_FILES['product_img']['name'];
          $product_img_tmp = $_FILES['product_img']['tmp_name'];
  
          move_uploaded_file($product_img_tmp, "product_images/$product_img");
  
          $insert_product = "insert into item (product_name,product_desc,product_price,product_quantity,product_cat,product_img,keywords)
           values ('ItemName','ItemDesc',ItemPrice,ItemQty,'ItemCat','ItemImg','keywords')" OR die(mysql_error());
  
  
           $insert_prod = mysqli_query($con, $insert_product);
           if($insert_prod){
  
              echo "&lt;script&gt;alert('SUCCESS')&lt;/script&gt;";
              echo "&lt;script&gt;window.open('insert_product.php','self')&lt;/script&gt;";
           }//END OF IF(INSERT_PROD)
  }
  ?&gt;  
  </code></pre>
  
  <p><strong>db.php</strong> &lt;-- For connection</p>
  
  <pre><code>   &lt;?php
  $con = mysqli_connect("localhost","root","","ecommerce");
  ?&gt;
  </code></pre>
  
  <p>Table from the database (Name is <code>ecommerce</code>) is <code>item</code>
  In my <code>item</code> table:
  <code>ItemID</code> Primary and AI
  <code>ItemName</code>
  <code>ItemDesc</code>
  <code>ItemPrice</code>
  <code>ItemQty</code>
  <code>ItemCat</code> 
  <code>ItemImg</code>
  <code>keywords</code></p>
  
  <p>NOTE: I'm aware that my code is vulnerable for SQL Injection attacks. But I'm still a beginner and focusing on connection with HTML and PHP stuffs :)</p>