title: PHP won't insert into the database in PHPmyAdmin
body: <p>So I've been battling with this for days trying to figure out why my 'products' are not uploading into phpMyAdmin after the user submits a form - The application is one that allows members to create their own products...&amp; the place i'm stuck at is as follows: I'm a logged in user i'm on the "List a Product" page from my user admin.  when i enter the product info then click to submit it won't post the product &amp; associated data to phpmyadmin.  and I'm trying to move the image uploaded to a folder via a move_uploaded_file function.  Any help would be greatly appreciated.  All code should be below (database is connected and all the sessions set properly, etc I believe):</p>
  
  <p>Form from the create_product.php (the page where a logged in user lists a new product:</p>
  
  <pre><code>if (isset($_POST['product_name'], $_POST['product_description'])) {
  $product_name = $_POST['product_name'];
  $product_description = $_POST['product_description'];
  
  $errors = array();
  
  if (empty($product_name) || empty($product_description)) {
      $errors[] = "All Fields are required";
  } else {
      if (strlen($product_name) &gt; 55 || strlen($product_description) &gt; 255) {
          $errors[] = "One or more fields contains too many characters";
      } 
  
  }
  
  if (!empty($errors)) {
      foreach ($errors as $error) {
          echo $error, '&lt;br/&gt;';
          }
      } else {
          create_product($product_name, $product_description);
  
          header("location: product.php?product_id='.$product_id.'");
          exit();
      }
  }
  
  &lt;form action="" method="post" enctype="multipart/form-data"&gt;
          &lt;p&gt;Product Name:&lt;br/&gt;&lt;input type="text" name="product_name" maxlength="55" /&gt;&lt;/p&gt;
          &lt;p&gt;Describe this Product:&lt;br/&gt;&lt;textarea name="product_description" rows="6" cols="35" maxlength="255"&gt;&lt;/textarea&gt;&lt;/p&gt;
  
          &lt;p&gt;Upload a product profile pic:&lt;br/&gt;&lt;input type="file" name="fileField" id="fileField" /&gt;&lt;/p&gt;
          &lt;p&gt;&lt;input type="submit" value="Create"&gt;&lt;/p&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Function from my product.functions.php file (which is included on the create_product.php file):</p>
  
  <pre><code>function create_product($product_name, $product_description) {
  $product_name = mysql_real_escape_string(htmlentities($product_name));
  $product_description = mysql_real_escape_string(htmlentities($product_description));
  
  mysql_query("INSERT INTO `products` VALUES ('','".$_SESSION['member_id']."', UNIX_TIMESTAMP(), '$product_name', '$product_description')");
  
  $bmid = mysql_insert_id();
  // place image in the folder
  $newname = "$bmid.jpg";
  move_uploaded_file($_FILES['fileField']['tmp_name'],'uploads/$newname');
  }
  </code></pre>
  
  <p>I believe my issue may be coming from the image upload, but i've been struggling with this forever...Thanks for any help you can provide...</p>