title: wordpress file field not working getting empty value
body: <p>i want to add name and image from admin panel. i already created a table in mysql</p>
  
  <p>Name > Varchar[255]
  img > [text]</p>
  
  <p>when i click on save button name field works fine :) but <strong>file field alwasy empty</strong> how can i get the file field
  value and upload this image to a folder like <strong>"\wp-content\uploads\2014"</strong> </p>
  
  <p>i want to upload file in my cutom folder and save it's path to my mysql table. but not working here is my code.</p>
  
  <pre><code>&lt;?php
  $id = $_POST["id"];
  $name = $_POST["name"];
  $photo = $_POST["photo"];
  
  //insert
  if(isset($_POST['insert'])){
      global $wpdb;
      $wpdb-&gt;insert(
          'wp_savans', //table
          array(
          'name' =&gt; $name,
          'photo' =&gt; $photo
          ),
          array('%s', '%s') //data format         
      );
      $message.="Inserted";
  }
  ?&gt;
  
  &lt;div class="wrap"&gt;
  &lt;?php if (isset($message)): ?&gt;&lt;div class="updated"&gt;&lt;p&gt;&lt;?php echo $message;?&gt;&lt;/p&gt;&lt;/div&gt;&lt;?php endif;?&gt;
  &lt;form method="post" name="form1" enctype="multipart/form-data" action="&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;"&gt;
  &lt;table width="464" border="0"&gt;
    &lt;tr&gt;
      &lt;td width="127" bgcolor="#66CCFF"&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;
      &lt;td width="327"&gt;&lt;label for="name"&gt;&lt;/label&gt;
      &lt;input type="text" name="name" id="name" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td bgcolor="#66CCFF"&gt;&lt;strong&gt;Photopath&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input name="photo" id="photo" type="file"&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type='submit' name="insert" value='Save' class='button'&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>