title: How do I ZIP selected files for user to download?
body: <p>Its my first post in stackoverflow, so please let me know if something is wrong so I can fix it, thanks.</p>
  
  <p>I have the following code in my website...</p>
  
  <pre><code>&lt;table id="fruits"&gt;
      &lt;tbody&gt;
          &lt;tr class="file" id="tr-file"&gt;
              &lt;td class="name" id="id1"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE1&lt;/a&gt;&lt;/td&gt;
              &lt;td class="name" id="id2"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE2&lt;/a&gt;&lt;/td&gt;
              &lt;td class="name" id="id3"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE3&lt;/a&gt;&lt;/td&gt;
              &lt;td class="name" id="id4"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE4&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt; 
  &lt;/table&gt;
  </code></pre>
  
  <p>I know I can zip the files in cpanel or upload the files zipped and put it as a link in the page...
  But
  I want the visitor to choose which files they want to download, no force them to download all 4 files. So I searched in Google and <a href="https://stackoverflow.com/questions/921308/how-can-i-generate-a-temporary-zip-file-then-auto-remove-it-after-it-is-downloa/924067#924067">found a useful post</a>. (THE PROBLEM IS THAT I JUST KNOW THE BASIC OF HTML, I dont understand what he wrote)
  I want the visitor to select multiples files from <code>&lt;table id="fruits"&gt;</code>.</p>
  
  <p>Example: <a href="http://jsfiddle.net/dn3L7/" rel="nofollow noreferrer">http://jsfiddle.net/dn3L7/</a></p>
  
  <pre><code> &lt;table id="fruits"&gt;
          &lt;tbody&gt;
              &lt;tr class="file" id="tr-file"&gt;
                 &lt;input type"checkbox" id="idc1"&gt; &lt;td class="name" id="id1"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE1&lt;/a&gt;&lt;/td&gt;
                 &lt;input type"checkbox" id="idc2"&gt; &lt;td class="name" id="id2"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE2&lt;/a&gt;&lt;/td&gt;
                 &lt;input type"checkbox" id="idc3"&gt; &lt;td class="name" id="id3"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE3&lt;/a&gt;&lt;/td&gt;
                 &lt;input type"checkbox" id="idc4"&gt; &lt;input type"checkbox" id=""idc1&gt;  &lt;td class="name" id="id4"&gt;&lt;a class="thickbox" href="FILE-LINK"&gt;NAME-OF-FILE4&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt; 
      &lt;/table&gt;
  </code></pre>
  
  <p>When they finish checking the files they will be able to click a button to download the zip file.</p>