title: if(isset($_FILES)) Not working in PHP
body: <p>i can't get the input type file value from an html form using $_FILES  , the isset($_FILES['NAME'])  to get the uploaded image  value from  the form , i have put an echo 'string' in  the first line of the isset condition  and it's not displaying it </p>
  
  <pre><code> &lt;form role="form" id="contact_form" class="contact-form" method="post" enctype="multipart/form-data"&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="col-md-12"&gt;
                                              &lt;ul class="row"&gt;
                                                  &lt;li class="col-sm-12"&gt;
                                                      &lt;label&gt;
                            &lt;input type="text" class="form-control" name="newpseudo" id="name" placeholder="php"&gt;
                          &lt;/label&gt;
                                                  &lt;/li&gt;
                                                  &lt;li class="col-sm-12"&gt;
                                                      &lt;label&gt;
                            &lt;input type="email" class="form-control" name="newmail" id="email" placeholder="*EMAIL"&gt;
                          &lt;/label&gt;
                                                  &lt;/li&gt;
                                                  &lt;li class="col-sm-12"&gt;
                                                      &lt;label&gt;
                            &lt;input type="password" class="form-control" name="newmdp1" id="company" placeholder="*MOT DE PASSE"&gt;
                          &lt;/label&gt;
                                                  &lt;/li&gt;
                                                  &lt;li class="col-sm-12"&gt;
                                                      &lt;label&gt;
                            &lt;input type="password" class="form-control" name="newmdp2" id="company" placeholder="*CONFIRMER VOTRE MOT DE PASSE"&gt;
                          &lt;/label&gt;
                                                  &lt;/li&gt;
  
                                                         &lt;li class="col-sm-12"&gt;
                                                          &lt;label&gt;Ajouter Photo de profil&lt;/label&gt;
                                                          &lt;input type="file" name="avatar" &gt;
                                                      &lt;/li&gt;
  
                                              &lt;/ul&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-md-12"&gt;
                                              &lt;ul class="row"&gt;
                                                  &lt;li class="col-sm-12 no-margin"&gt;
                                                      &lt;button type="submit" value="submit" class="btn" id="btn_submit" onClick="proceed();" name="modifier"&gt;Mettre a jour&lt;/button&gt;
                                                  &lt;/li&gt;
                                              &lt;/ul&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/form&gt;
  </code></pre>
  
  <p>the PHP code  i'm trying to get it the file input value :</p>
  
  <pre><code>  if (isset($_FILES['avatar']) AND !empty($_FILES['avatar']['name'])) {
           echo "string";
           $taillemax = 2097152;
           $extensionsvalides = array('jpg','jpeg','gif','png');
           if ($_FILES['avatar']['size'] &lt;= $taillemax) {
               $extensionsUpload = strtolower(substr(strrchr($_FILES['avatar']['name'],'.'),1));
               if (in_array($extensionsUpload, $extensionsvalides)) {
                       $chemin ="membres/avatars/".$_SESSION['id'].".".$extensionsUpload;
                       $resultat = move_uploaded_file($_FILES['avatar']['tmp_name'], $chemin);
                       if ($resultat) {
                           $updateavatar = $bdd-&gt;prepare('UPDATE memebre SET avatar = :avatar WHERE id = :id');
                           $updateavatar-&gt;execute(array('avatar'=&gt;$_SESSION['id'].".".$extensionsUpload,'id' =&gt; $_SESSION['id']));
                                 header("Location: userProfile.php?id=".$_SESSION['id']);
  
                       }
                       else
                       {
                          $msg = "Erreur de l'importation de votre photo de profil";
                       }
               }
               else
               {
                  $msg = "votre photo de profil  doit etre de format jpg , jpeg ou png";
               }
           }
  </code></pre>