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 \n Last Name: $lname \n Address: $address \n City:$city \n Postal Code:$zip \n Country: $country \n Position Applied for: $position \n email: $email \n Services Required: $services \n Resume: $filename";
$recipient = "rohit@gmail.com";
$subject = "Clinogent - Job Application";
$mailheader = "From: $email \r\n";
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