title: How to use the data from the row selected?
body: <p>How can I collect the data on the row from the table that I select and use it in the result?</p>
  
  <p>Here is the javascript I am using to show the data entry screen, once the function has been called by selecting the row. Now I just need to design a form in PHP that will include (1) some of the data from the row selected and (2) some new data that will be collected.</p>
  
  <h2>Here is the Javascript to select the row and call the data entry form</h2>
  
  <pre><code>$(document).ready(function () {
      $("tr").live('click',function(){
          $.post('data_entry_form.php', function(data) {
              $('#section2').html(data);
          });
      });
  });
  </code></pre>
  
  <h2>Here is the PHP Script</h2>
  
  <pre><code>&lt;?php
  require_once "config.php";
  $dbh = new PDO($dsn, $dbuser, $dbpass);
  $dbh-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  $dbh-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
  
  $result = $dbh-&gt;query("SELECT aif_id, fee_source_id, company_name_per_sedar, document_filing_date FROM a_aif ORDER BY aif_id DESC");
  $result-&gt;setFetchMode(PDO::FETCH_ASSOC);
  
  echo "&lt;table id=\"all_aifs\"&gt;";
  echo "&lt;tr&gt;";
  echo "&lt;th&gt;&lt;b&gt;Document ID&lt;/b&gt;&lt;/th&gt;";
  echo "&lt;th&gt;&lt;b&gt;Pubco Name&lt;/b&gt;&lt;/th&gt;";
  echo "&lt;th&gt;&lt;b&gt;Filing Date&lt;/b&gt;&lt;/th&gt;";
  echo "&lt;th&gt;&lt;b&gt;PDF&lt;/b&gt;&lt;/th&gt;";
  echo "&lt;/tr&gt;";
  
  foreach($result as $index =&gt; $row) {
  echo "&lt;tr&gt;";
  echo "&lt;td&gt;$row[fee_source_id]&lt;/td&gt;";
  echo "&lt;td&gt;$row[company_name_per_sedar]&lt;/td&gt;";
  echo "&lt;td&gt;$row[document_filing_date]&lt;/td&gt;";
  echo "&lt;td&gt;Placeholder&lt;/td&gt;";
  echo "&lt;/tr&gt;";
  }
  
  echo "&lt;/table&gt;";
  echo "&lt;br&gt;";
  $dbh = NULL;
  ?&gt;
  </code></pre>