title: How to make file upload through a form not required?
body: <p>I’m working on my first PHP file upload code and have a few questions. Sorry, I’m a newbie but look forward to learning and could use some help.</p>
  
  <p>I need to know how to make a File Upload through a form as a <strong>not required</strong> step.</p>
  
  <p>Right now I have the code doing an <code>if/else</code> but if the user doesn’t upload a file then I still get an error. Probably because the <code>if</code> statement comes back as <code>false</code>. </p>
  
  <p>Do I need another <code>else</code> statement or is there something else like an <code>or</code> statement?</p>
  
  <pre><code>    // Where the file is going to be placed 
      $target_path = "uploads/";
  
      /* Add the original filename to our target path.  
      Result is "uploads/filename.extension" */
      $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
  
      if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)){
      echo "The file ".  basename( $_FILES['uploadedfile']['name']). 
      " has been uploaded";
      }
      else{
      echo "There was an error uploading the file, please try again!";
      }
  </code></pre>