Hi All,

I am working on the project where there is the requirement pop up to send a mail with attachment, normal text emails are working fine without any issue. Please find my code below and let me know what i need to add to send attachment to work.


index.php


Code:
<p> <strong><em>PERSON :</em></strong> <input type="text" id="outgoing" name="outgoing" placeholder="Enter Your Name" /> 
&nbsp;&nbsp;<strong><em>  PERSON 2: </em></strong> <input type="text" id="incoming" name="incoming" autocomplete="on" placeholder="Next Person Name" /> &nbsp;&nbsp;
  <em><strong>COMMENTS :</strong></em> 
  <textarea name="shift_comments" id="shift_comments" style="width: 334px; height: 48px;" placeholder="Shift Comments" ></textarea>
  &nbsp;&nbsp;
 
 <label for='uploaded_file'>Select A File To Upload:</label> <br>
  <input type="file" name="uploaded_file">

  </p>
</fieldset>
email.php

Code:
                                    

//sql insert code
                         $outgoing=htmlspecialchars($_POST['outgoing']);

			$incoming=htmlspecialchars($_POST['incoming']);

	 		$shift_comments=htmlspecialchars($_POST['shift_comments']);

			$shift_comments=mysql_real_escape_string($shift_comments);

		

			$sql = mysql_query("INSERT INTO customer(DATE,OUTGOING,INCOMING,COMMENTS) VALUES('$date','$outgoing','$incoming','$shift_comments')")

			or die ("Database Connection Error" .mysql_error());

 
//email code
                                                $from="customer@abc.com";

						$to="xyz@abc.com";

						$subject="customer details of $date";
							
						$message ="message body.";
						
                                                $header = 'MIME-Version: 1.0' . "\r\n";

						$header .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";			

						$header .= "From: {$from}\r\n"; 

						$header .= "Reply-To: {$to}\r\n"; 

						$header .= "Return-path: " . $to; 	

 						mail( $to,  $subject, $message, $header, "-f{$from}");

Please help me out what i need to do in my email.php script so that attachments can send properly.