title: Add file upload to mail.php
body: <p>I have contact form structure. With the following:</p>
  
  <p>HTML:</p>
  
  <pre><code>   &lt;form name="feedback_form" method="post" action="" class="feedback_form"&gt;
                                                  &lt;input type="text" name="field-name" value="İsim" title="İsim" class="field-name form_field"&gt;
                                                  &lt;input type="text" name="field-email" value="Email" title="Email" class="field-email form_field"&gt;
                                                  &lt;input type="text" name="field-subject" value="Başlık" title="Subject" class="field-subject form_field"&gt;
                                                  &lt;textarea name="field-message" cols="45" rows="5" title="Mesajınız..." class="field-message form_field"&gt;Mesajınız...&lt;/textarea&gt;
                                                  &lt;input type="reset" name="reset" id="reset2" value="Temizle" class="feedback_reset"&gt;
                                                  &lt;input type="button" name="submit" class="feedback_go" id="submit2" value="Gönder"&gt;                                    
  
  &lt;/form&gt;  
  </code></pre>
  
  <p>And i added this codes for file upload:</p>
  
  <pre><code>&lt;label for='uploaded_file'&gt;Upload your picture:&lt;/label&gt;
   &lt;input type="file" name="uploaded_file"&gt;
  </code></pre>
  
  <p>I want, users can upload jpg, png, gif, bmp images via this label. But i don't know how can i reorganize my mail.php file?</p>
  
  <p>mail.php:</p>
  
  <pre><code>&lt;?php
  header('Content-Type: text/html; charset=utf-8');
  
  function sendFeedback($feedback_email, $feedback_msg, $feedback_name, $feedback_subject, $feedback_file) {
  
  
      /* EDIT THIS */
      $admin_email = "mymail@gmail.com";
      if ($feedback_subject == "Subject" || empty($feedback_subject) ) {
          $subj = "Email from your site";
      } else {
          $subj = $feedback_subject;
      }
  
  
      /* //EDIT THIS */
  
  
      $message = "
      &lt;html&gt;
      &lt;head&gt;
        &lt;title&gt;Websitenizin emaili&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p&gt;&lt;a href='mailto:".$feedback_email."'&gt;".$feedback_name."&lt;/a&gt; send this message:&lt;/p&gt;
          &lt;p&gt;".$feedback_msg."&lt;/p&gt;
          &lt;p&gt;".$subject."&lt;/p&gt;
      &lt;/body&gt;
      &lt;/html&gt;
      ";
      $headers  = 'MIME-Version: 1.0' . "\r\n";
      $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
  
      if ($feedback_name!=="Name" &amp;&amp; $feedback_email!=="Email" &amp;&amp; !empty($feedback_email) &amp;&amp; !empty($feedback_msg) &amp;&amp; !empty($feedback_name) ) {
          if ($feedback_email == "mail_error") {
              echo "&lt;span class='ajaxok'&gt;Geçersiz email adresi.&lt;/span&gt;";
          } else {            
              mail($admin_email, $subj, $message, $headers);
              echo "&lt;span class='ajaxok'&gt;Teşekkürler. Mesajınız gönderilmiştir.&lt;/span&gt;";  
          }
      } else {
          echo "&lt;span class='ajaxalert'&gt;Lütfen zorunlu alanları doldurunuz.&lt;/span&gt;";      
      }
  
  
  }
  
  sendFeedback($_POST['email'], $_POST['message'], $_POST['name'], $_POST['subject'], $_POST['file']);
  ?&gt;
  </code></pre>