title: Saving multiple attachments and retriving them
body: <p>I have a simple html form, that sends a Email, with multiple attachments (max of 5). I am saving the Email messages, Address in phpadmin. Now i want to save the multiple attachments also. 
  How can i save multiple attachments, and then retrive then back on an other page.</p>
  
  <p>I am using phpmailer to send Email and attachments, The loop for sending attachments is:</p>
  
  <pre><code>  $MyUploads = array();
    foreach(array_keys($_FILES['attach']['name']) as $key) 
  {  
  $filesize = $_FILES['attach']['size'][$key];
  $extention = pathinfo ($_FILES['attach']['name'][$key] ,PATHINFO_EXTENSION );
  $name=$_FILES['attach']['name'][$key];
      $filePath = $Location . $name;
      $tmpName = $_FILES['attach']['tmp_name'][$key];
  
  
  if(move_uploaded_file($tmpName, $filePath))
      {$MyUploads[] = $Location;}
       else
      {$MyUploads[]='';}
       print_r($MyUploads);
  
  
  $source = $_FILES['attach']['tmp_name'][$key];
  $filename = $_FILES['attach']['name'][$key];
  $mail-&gt;AddAttachment($source, $filename);
  
  }
  </code></pre>
  
  <p>And the query for inserting these files location in to database is</p>
  
  <pre><code>$insert = "INSERT INTO upload (name, type, size, file1, file2, file3, file4, file5,
      created) VALUES  
              ( 
              '".$name."',  
              '".$extention."',  
              '".$filesize."',  
              '".$MyUploads[0]."',  
              '".$MyUploads[1]."',  
              '".$MyUploads[2]."',  
              '".$MyUploads[3]."',
      '".$MyUploads[4]."' ,
      now() 
              )"; 
        $result = $dbLink-&gt;query($insert);
  </code></pre>
  
  <p>please now how can i retrive these files on another php page. Please  i am a beginner so any toturial.</p>