title: PHP File Uploading - No File Uploaded Error
body: <p>I've created an image uploading form , using twitter bootstrap and the jansy extention, using the next code section:</p>
  
  <pre><code>     &lt;form action="fileName.php" method="post" enctype="multipart/form-data"&gt;
           &lt;div class="fileupload fileupload-new" data-provides="fileupload"&gt;
            &lt;div class="fileupload-preview thumbnail" style="width: 200px; height: 150px;"&gt;&lt;/div&gt;
            &lt;div&gt;
              &lt;span class="btn btn-file"&gt;&lt;span class="fileupload-new"&gt;Select image&lt;/span&gt;&lt;span class="fileupload-exists"&gt;Change&lt;/span&gt;&lt;input type="file" name="pic" id="pic"/&gt;&lt;/span&gt;
              &lt;a href="#" class="btn fileupload-exists" data-dismiss="fileupload"&gt;Remove&lt;/a&gt;
              &lt;button type="submit" class="btn"&gt;Upload&lt;/button&gt;
            &lt;/div&gt;
        &lt;/form&gt;
  </code></pre>
  
  <p>on the fileName.php the following code is executed:</p>
  
  <pre><code>print_r($_FILES);
  if($_FILES["pic"]["error"] &gt; 0){ /*image uploading has failed*/
          echo "Error occured ".$_FILES["pic"]["error"];  
      }
  else {
      echo "image was uploaded successfully";
  }
  </code></pre>
  
  <p>and returns the next message :</p>
  
  <pre><code>Array ( [pic] =&gt; Array ( [name] =&gt; [type] =&gt; [tmp_name] =&gt; [error] =&gt; 4 [size] =&gt; 0 ) ) Error occured 4
  </code></pre>
  
  <p>How come the file is not uploaded ? How could I solve this?</p>
  
  <p>Thanks.</p>