title: How to display dynamical content from a remote file in bootstrap modal using php?
body: <p>I have following table that shows some info and calls a remote modal box.</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;ID&lt;/td&gt;
          &lt;td&gt;Name&lt;/td&gt;
          &lt;td&gt;Family Name&lt;/td&gt;
          &lt;td&gt;Country&lt;/td&gt;
          &lt;td&gt;OK&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;01&lt;/td&gt;
          &lt;td&gt;John&lt;/td&gt;
          &lt;td&gt;Lennon&lt;/td&gt;
          &lt;td&gt;UK&lt;/td&gt;
          &lt;td&gt;
              &lt;a class="btn btn-info" data-target="#myModal" data-toggle="modal" href="remote.php"&gt;OK&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;02&lt;/td&gt;
          &lt;td&gt;Joey&lt;/td&gt;
          &lt;td&gt;Ramone&lt;/td&gt;
          &lt;td&gt;US&lt;/td&gt;
          &lt;td&gt;
              &lt;a class="btn btn-info" data-target="#myModal" data-toggle="modal" href="remote.php"&gt;OK&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;03&lt;/td&gt;
          &lt;td&gt;Joe&lt;/td&gt;
          &lt;td&gt;Satriani&lt;/td&gt;
          &lt;td&gt;US&lt;/td&gt;
          &lt;td&gt;
              &lt;a class="btn btn-info" data-target="#myModal" data-toggle="modal" href="remote.php"&gt;OK&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And here my modal code:</p>
  
  <pre><code>&lt;!-- Modal --&gt;
  
  &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
  
      &lt;div class="modal-dialog"&gt;
  
          &lt;div class="modal-content"&gt;
  
          &lt;/div&gt; &lt;!-- /.modal-content --&gt;
  
      &lt;/div&gt; &lt;!-- /.modal-dialog --&gt;
  
  &lt;/div&gt; 
  
  &lt;!-- /.Modal --&gt;
  </code></pre>
  
  <p>I would like to know how I could send the info that appears inside the cells (td) of any line (tr) to the remote file (remote.php) where a php script would run with this info and give us an output that would be showed in the modal without to refresh the page.</p>
  
  <p>Before that I used to send by POST the info with a form:
  (I show here only the cell with the form. The rest is the same).</p>
  
  <pre><code>    &lt;tr&gt;
          &lt;td&gt; ... &lt;/td&gt;
          &lt;td&gt;
              &lt;form id="form" action="remote.php" method="POST"&gt;
                  &lt;input name="id" type="hidden" value="01" /&gt;
                  &lt;input name="name" type="hidden" value="Jonh" /&gt;
                  &lt;input name="family" type="hidden" value="Lennon" /&gt;
                  &lt;input name="country" type="hidden" value="UK" /&gt;
                  &lt;input type="submit" value="OK"&gt;
              &lt;/form&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>After the script ran it was redirect back to the page and the modal was shown. That's what I would like to avoid.</p>
  
  <p>Until now I'm able to show the content of the remote file in the modal. But it's a static content. Does anybody have an idea how can I send the info (variables) of the table to the remote file dynamically with this modal structure?</p>
  
  <p>Many thanks in advance for your help!</p>