title: PHP codeigniter file upload $_FILES['pic']['tmp_name'];
body: <p>i have a simple and trouble understanding about these things in CodeIgniter. </p>
  
  <p><code>$_FILES['pic']['tmp_name']</code> does not work correctly. </p>
  
  <p>I receive a notice Message: <code>Undefined index: pic</code></p>
  
  <p>Here is my code</p>
  
  <p><strong>controller:</strong></p>
  
  <pre><code> if(is_uploaded_file($_FILES['pic']['tmp_name'])){
       move_uploaded_file($_FILES['pic']['tmp_name'],
                          'images/slideshow'.$_FILES['pic']['name']);
          }
  </code></pre>
  
  <p><strong>view:</strong></p>
  
  <pre><code>&lt;form action="" method="post" id="validate" enctype="multipart/form-data" &gt;
     &lt;div class="div_input"&gt;
        &lt;label class="label_input"&gt; picture:  &lt;/label&gt;    
        &lt;input type="file" id="pic" name="pic" class="file_1 " /&gt;      
     &lt;/div&gt;
     &lt;div class="clear"&gt;&lt;/div&gt;
     &lt;div class="div_input"&gt;
        &lt;label class="label_input"&gt; &lt;/label&gt;
        &lt;input type="submit" name="submit" value="" class="form-submit" /&gt;    
        &lt;input type="reset" value="" class="form-reset"  /&gt;  
     &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>