title: move_uploaded_file not working but no error
body: <p>I have been having an issue with my code, specifically with the move_uploaded_file.  I changed the folder I keep the images in's permissions to 777 to make sure it wasn't a problem with the permissions.  I also read a php manual on how to use move_uploaded_file of w3schools.com.  I have run out of ideas on how to upload my image to a folder using php.  Please help.</p>
  
  <p>Here is the portion of the code with the move_uploeaded_file:</p>
  
  <pre><code>&lt;?php
      if (@$_GET['action'] == "ci"){
          echo "&lt;form action='account.php?action=ci' method='POST' enctype='multipart/form-data'&gt;&lt;br /&gt;
          Available file extention: &lt;stong&gt;.PNG .JPG .JPEG&lt;/stong&gt;&lt;br /&gt;&lt;br /&gt;
          &lt;input type='file' name='image' /&gt;&lt;br /&gt;
          &lt;input type='submit' name='change_pic' value='Change' /&gt;&lt;br /&gt;
          &lt;/form&gt;";
          if (isset($_POST['change_pic'])) {
              $errors = array();
              $allowed_e = array('png', 'jpg', 'jpeg');
  
              $file_name = $_FILES['image']['name'];
              $file_e = strtolower(pathinfo($file_name, PATHINFO_EXTENSION));
              $file_s = $_FILES['image']['size'];
              $file_tmp = $_FILES['image']['tmp_name'];
  
              if(in_array($file_e, $allowed_e) === false) {
                  $errors[] = 'This file extension is not allowed.';
              }
  
              if ($file_s &gt; 2097152) {
                  $errors[] = 'File size must be under 2MB';
              }
  
              if (empty($errors)) {
                  move_uploaded_file($file_tmp, '../images/'.$file_name);
                  $image_up = '../images/'.$file_name;
                  $check = mysqli_query($connect, "SELECT * FROM users WHERE usename='".@$_SESSION['username']."'");
                  $rows = mysqli_num_rows($check);
  
                  while($row = mysqli_fetch_assoc($check)) {
                      $db_image = $row['profile_pic'];
                  }
                  if($query = mysqli_query($connect, "UPDATE users SET profile_pic = '".$image_up."' WHERE username='".$_SESSION['username']."'"))
                      echo "You have successfuly changed your profile picture!";
          } else {
                  foreach($errors as $error) {
                      echo $error, '&lt;br /&gt;';
                  }
              }
          }
      }
  ?&gt;
  </code></pre>