title: How to show data on a hidden div
body: <p>I have buttons with names from database displayed on my browser, what I want to achieve is to display the documents' requirement in a hidden div which is toggled through the buttons. The thing is I don't know how I attempted to use ajax but seems so complicated and it makes me confused. So I'm just looking for the simplest that it can be. And I think it could be jQuery which is to be used but I just dont know how to make functions and combine it with php.
  Can anyone help me with this.</p>
  
  <p>This is my code that displays the document's name and the button.</p>
  
  <pre><code>&lt;div id="sidebar"&gt;
      &lt;h3&gt;Request Documents&lt;/h3&gt;
  
      &lt;ul class=""&gt;
      &lt;?php 
          include_once 'dbconnect.php';
          $query = "SELECT d.document_id,d.document_name
                      FROM document_tbl AS d";
  
          if (!$result = mysql_query($query)) {
              exit(mysql_error());
          }
  
          // if query results contains rows then featch those rows 
          if(mysql_num_rows($result) &gt; 0) {
  
              while($row = mysql_fetch_assoc($result)){
                  echo'&lt;li class=""&gt;
                      &lt;p&gt;&lt;button onclick="readRecords('.$row['document_id'].')" class="btn btn-info btn-lg"&gt;'.$row['document_name'].'&lt;/button&gt;&lt;/p&gt;
                      &lt;/li&gt;';
              }
          }
      ?&gt;
  
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I just don't know what to do with the rest.</p>