title: Ajax load php file into div
body: <p>Hy I have dynamic div the Containing search result, I im tring to code that if one of the div is clicked than load php file into some div.
  the problem that I can't figure out how to do that with send a POST/GET request.</p>
  
  <p>this is the search result:</p>
  
  <pre><code>&lt;div id="srcfrd"&gt;
      &lt;img src='webimgs/nopf.jpg'&gt;
      &lt;span class="name"&gt;&lt;h4&gt;&amp;nbsp;fullname&lt;/h4&gt;&lt;/span&gt;
      &lt;input type="text" id="friendid" value="1" hidden&gt;
      &lt;br/&gt;
  &lt;/div&gt;
  &lt;div id="srcfrd"&gt;
      &lt;img src='webimgs/nopf.jpg'&gt;
      &lt;span class="name"&gt;&lt;h4&gt;&amp;nbsp;fullname&lt;/h4&gt;&lt;/span&gt;
      &lt;input type="text" id="friendid" value="2" hidden&gt;
      &lt;br/&gt;
  &lt;/div&gt;
  &lt;div id="srcfrd"&gt;
      &lt;img src='webimgs/nopf.jpg'&gt;
      &lt;span class="name"&gt;&lt;h4&gt;&amp;nbsp;fullname&lt;/h4&gt;&lt;/span&gt;
      &lt;input type="text" id="friendid" value="3" hidden&gt;
      &lt;br/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>now, onclick on one of the divs it should load a php file in another div.
  the php file should print the friend details according to the POST/GET id request.</p>
  
  <p>this is my js (its is load the php but i need to add the id value to show the correct user)</p>
  
  <pre><code>    $('#srcfrd').click(function() {
      $.get('showfriend.php', function(data) {
          $('#middelfeedbody').html(data);
      });
  });
  </code></pre>
  
  <p>and here I am stuck</p>
  
  <pre><code>    $('#srcfrd').click(function() {
  
      var idvalue = ??
  
      $.get('showfriend.php?id="+idvalue+"', function(data) {
          $('#middelfeedbody').html(data);
      });
  });
  </code></pre>