如何从输入标签发送附件到电子邮件

I want to send an attachment to email through html file input. So far this is my code, i am able to send mail but not the ataachment

    <?php
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];
$country = $_POST['country'];
$position = $_POST['position'];
$services = $_POST['services'];
$filename = $_POST['filename'];
$formcontent=" First Name: $fname 
 Last Name: $lname 
 Address: $address 
 City:$city 
 Postal Code:$zip 
 Country: $country 
 Position Applied for: $position 
 email: $email  
 Services Required: $services 
  Resume: $filename";

$recipient = "rohit@gmail.com";
$subject = "Clinogent - Job Application";
$mailheader = "From: $email 
";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");

?>
  <html>
    <head>
        <script>
        function load(){
            window.setTimeout(function() {
                window.location.href="http://www.clinogent.com/currentopeningapply.html";
            },0);
        }
        </script>
    </head>
<body onload="load();">
</body>
 </html>

How do i proceed further

This is the great PHP Mailer class:

https://github.com/PHPMailer/PHPMailer

Already solved your Problem:

Send File Attachment from Form Using phpMailer and PHP