title: how to upload multiple files, store their paths in different columns in a mysql database row
body: <p>Hello i am trying to create a subscription form, that allows  a user to fill in a form and upload multiple files.
  already i have gotten some directions on this site as regards uploading a file and storing their paths in a database using this.</p>
  
  <pre><code>     &lt;form method="post" action="addMember.php" enctype="multipart/form-data"&gt;
      &lt;p&gt;
                Please Enter the Band Members Name.
              &lt;/p&gt;
              &lt;p&gt;
                Band Member or Affiliates Name:
              &lt;/p&gt;
              &lt;input type="text" name="nameMember"/&gt;
              &lt;p&gt;
                Please Enter the Band Members Position. Example:Drums.
              &lt;/p&gt;
              &lt;p&gt;
                Band Position:
              &lt;/p&gt;
              &lt;input type="text" name="bandMember"/&gt;
              &lt;p&gt;
                Please Upload a Photo of the Member in gif or jpeg format. The file name should be named after the Members name. If the same file name is uploaded twice it will be overwritten! Maxium size of File is 35kb.
              &lt;/p&gt;
              &lt;p&gt;
                Photo:
              &lt;/p&gt;
              &lt;input type="hidden" name="size" value="350000"&gt;
              &lt;input type="file" name="photo"&gt; 
              &lt;p&gt;
                Please Enter any other information about the band member here.
              &lt;/p&gt;
              &lt;p&gt;
                Other Member Information:
              &lt;/p&gt;
  &lt;textarea rows="10" cols="35" name="aboutMember"&gt;
  &lt;/textarea&gt;
              &lt;p&gt;
                Please Enter any other Bands the Member has been in.
              &lt;/p&gt;
              &lt;p&gt;
                Other Bands:
              &lt;/p&gt;
              &lt;input type="text" name="otherBands" size=30 /&gt;
              &lt;br/&gt;
              &lt;br/&gt;
              &lt;input TYPE="submit" name="upload" title="Add data to the Database" value="Add Member"/&gt;
            &lt;/form&gt;
  and the php code for inserting this
  
     &lt;?php
  
  //This is the directory where images will be saved
  $target = "your directory";
  $target = $target . basename( $_FILES['photo']['name']);
  
  //This gets all the other information from the form
  $name=$_POST['nameMember'];
  $bandMember=$_POST['bandMember'];
  $pic=($_FILES['photo']['name']);
  $about=$_POST['aboutMember'];
  $bands=$_POST['otherBands'];
  
  
  // Connects to your Database
  mysql_connect("yourhost", "username", "password") or die(mysql_error()) ;
  mysql_select_db("dbName") or die(mysql_error()) ;
  
  //Writes the information to the database
  mysql_query("INSERT INTO tableName (nameMember,bandMember,photo,aboutMember,otherBands)
  VALUES ('$name', '$bandMember', '$pic', '$about', '$bands')") ;
  
  //Writes the photo to the server
  if(move_uploaded_file($_FILES['photo']['tmp_name'], $target))
  {
  
  //Tells you if its all ok
  echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
  }
  else {
  
  //Gives and error if its not
  echo "Sorry, there was a problem uploading your file.";
  }
  ?&gt;
  </code></pre>
  
  <p>this stores the path of the uploaded file in the column "photo" below</p>
  
  <pre><code>id nameMember bandMember photo aboutMember otherBands
  </code></pre>
  
  <p>but what i want do is have mutiple upload fields and store their paths in different columns photo, photo1 , photo2
  e.g </p>
  
  <pre><code> &lt;input type="file" name="photo"&gt; 
   &lt;input type="file" name="photo1"&gt; 
   &lt;input type="file" name="photo2"&gt; 
  id nameMember bandMember photo photo1 photo2 aboutMember otherBands
  </code></pre>
  
  <p>please how do i go about this</p>