title: HTML adding an if statement to <option><select>
body: <p>I have an image uploader and I'm trying to make the site display what type of option has been selected when the file is uploaded. I will later add this functionality to connect to different tables in a database, but for now I just want it printing out what option has been selected. </p>
  
  <p>Here is my upload. html:</p>
  
  <pre><code>&lt;body&gt;
  &lt;form enctype="multipart/form-data" action="uploader.php" method="POST"&gt;
  &lt;input type="hidden" name="MAX_FILE_SIZE" value="400000" /&gt;
  Choose a file to upload:
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;input name="uploadedfile" type="file" /&gt;
  &lt;br /&gt;
  &lt;select name = "uploadType"&gt;
  &lt;option value="Picture"&gt;Picture&lt;/option&gt;
  &lt;option value="Video"&gt;Video&lt;/option&gt;
  &lt;option value="Fact"&gt;Fact&lt;/option&gt;
  &lt;/select&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;input type="submit" value="Upload File" /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And here is my uploader. php:
      
  
  <pre><code>$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";
  
  if (uploadType == "Picture"){
  echo "\nYou have uploaded a picture.";
  
  } if (uploadType == "Video"){
  echo "\nYou have uploaded a video.";
  } if (uploadType == "Fact"){
  echo "\nYou have uploaded a fact.";
  } else{
  echo "\nuploadType fail!";
  }
  
  } else{
      echo "There was an error uploading the file, please try again!";
  }
  </code></pre>
  
  <p>Every time I try to upload it just comes up with the "uploadType fail!" message. What am I doing wrong?</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p>Thank you so much!</p>