title: Sending data via AJAX
body: <p>i have a build a javascript which does following:
  Get content via ajax->php->sql and show it on index.php
  after clicking the content there will be shown new content.</p>
  
  <p>Now I want to have a function which sends data after content is clicked to a php which will do something in in the db. How can i create a function which will send data? Thank you!</p>
  
  <p>This is my code which shows content:</p>
  
  <pre><code>&lt;script id="source" language="javascript" type="text/javascript"&gt;
  function laden(){
  $(function() 
  {
  
  $.ajax({                  
  `usr_id`                    
    url: 'content/get.php',              
  
  
    dataType: 'json',                   
    success: function(data)         
    {
      var id = data[0];             
      var name = data[1];
  
      var count = data[3];
  
  
      $('#output').html('&lt;div onclick="laden('+id+')" id="content"&gt;&lt;/div&gt;');
  
    } 
  });
  </code></pre>
  
  <p>}); 
      }
      `</p>