title: How to attach multiple files in mail using php?
body: <pre><code>&lt;?php
  header('Content-type: application/json');
  $status = array(
      'type'=&gt;'success',
      'message'=&gt;'Thank you for contact us. As early as possible  we will contact you '
  );  
  
  $name = @trim(stripslashes($_POST['name'])); 
  $email = @trim(stripslashes($_POST['email'])); 
  $subject = @trim(stripslashes($_POST['subject'])); 
  $message = @trim(stripslashes($_POST['message'])); 
  
  $email_from = $email;
  $email_to = 'reflexivezhcet@gmail.com';//replace with your email
  
  $body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;
  
  $success = @mail($email_to, $subject, $body, 'From: &lt;'.$email_from.'&gt;');
  
  echo json_encode($status);
  die;
  </code></pre>
  
  <p>This code is for sending only text to the recipient how could I improve it for sending multiple files using php? Is there any need for maintaining database for it?  </p>